Track remaining account credits
This method can be used for self service accounts to track the remaining credit balance from a remote application.
You can also define a credits limit in the administration section and we'll send you a e-mail notification as soon as your remaining balance falls below your specified value.
In order to pull account credits information,
you should send requests to either:
- HTTP Reception Gateway
- HTTPS Reception Gateway
Accounts credits request parameters
The HTTP POST transmission string is composed of
keywords with associated values, separated by
equals sign (=). All such keyword=value pairs are
connected with standard HTTP POST character &.
The hole HTTP request should be URL encoded.
The MT request consists of the following parameters:
(Fixed command value)
(Your account name)
(Your account password)
Account credits result codes
Upon reception of the MT POST transmission string,
the gateway will respond back with one of the following
possible result codes:
- 01 1234
(Where 1234 = remaining account credits)
- 90 INVALID ACCOUNT
Error: The account doesn’t exist
- 91 INVALID PASSWORD
Error: The password is incorrect
- 92 INVALID PARAMETERS
Error: Mandatory parameters are missing
- 94 UNTRUSTED HOST
Error: Requesting host is not granted access
For self service accounts, you can configure the trusted hosts from within the administration section.
Shell script examples using CURL
You can use any software or programming language for accessing the HTTP / HTTPS account credits interface. Below we are providing example scripts of the most basic part, using CURL for the request.
For the script examples, you will need to install the CURL version corresponding to your operating system:
- Visit the CURL download page and download the version for your needs
Shell scripts for retrieving remaining account balance information
Linux/Unix/Mac OS X shell scripts
Windows shell scripts