This section describes how to view a sub-account’s credit balance using the API-X Credit Check API.
https://orgds.com.ng/api?cmd=balance&token=APIX_xxxxxx
API-X Credit Check Parameters
Response Message
When a successful Credit Balance call is made, the response will be a numeric credit balance of the API-X account. For example,
1234.12
If any error occurs, the error code and message will appear instead. See possible error codes here.
Sample API-X Credit Check PHP Code
<?php
//Check SMS Credit Balance of API-X account
$token = "API_TOKEN";
$balanceUrl = "https://orgds.com.ng/api?cmd=balance" . "&token=".$token;
if ($reply = file_get_contents($balanceUrl)) {
echo $reply; //reply will be numeric credit balance on the APIX sub-account
}
?>