PHP code example of iak-id / iak-api-php

1. Go to this page and download the library: Download iak-id/iak-api-php library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

iak-id / iak-api-php example snippets


composer 


// import autoload
ass
use IakID\IakApiPHP\Services\IAKPrepaid;

$iakPrepaid = new IAKPrepaid([
  'userHp' => 'your-username',
  'apiKey' => 'your-api-key-depending-on-stage',
  'stage' => 'sandbox-or-production'
]);

$balanceResult = $iakPrepaid->checkBalance();
echo $balanceResult;


// import autoload
lass
use IakID\IakApiPHP\Services\IAKPostpaid;

$iakPostpaid = new IAKPostpaid([
  'userHp' => 'your-username',
  'apiKey' => 'your-api-key-depending-on-stage',
  'stage' => 'sandbox-or-production'
]);

$pricelistResult = $iakPostpaid->pricelist();
echo $pricelistResult;