API-N Credit Check

  API-N

This section describes how to view a main account’s credit balance using the API-N Credit Check API. 

https://orgds.org/api?cmd=balance&username=xxxxxx&password=xxxxxx

API-N Credit Check Parameters

Response Message

When a successful Credit Balance call is made, the response will be a numeric credit balance of the main account. For example,

1234.12

If any error occurs, the error code and message will appear instead. See possible error codes here.

Sample API-N Credit Check PHP Code

<?php
	//Check SMS Credit Balance of a main account
	$username = "username";
	$password = "password";
	
	$balanceUrl = "https://orgds.org/api?cmd=balance" . "&username=".$username . "&password=".$password;

     if ($reply = file_get_contents($balanceUrl)) { 
	      echo $reply; //reply will be numeric credit balance on the user's account
     }
?>