URL
https://onlinesim.io/api/getBalance.php?apikey=APIKEY
It returns information on the balance.
Example
- javascript
var settings = {
"async": true,
"crossDomain": true,
"url": "https://onlinesim.io/api/getBalance.php?apikey=APIKEY",
"method": "GET",
"headers": {"accept": "application/json"}
}
$.ajax(settings).done(function (response) {
console.log(response);
});
- php
$curl = curl_init();
curl_setopt_array($curl, array(
CURLOPT_URL => "https://onlinesim.io/api/getBalance.php?apikey=APIKEY",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_SSL_VERIFYHOST => false,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
]
));
$response = curl_exec($curl);
curl_close($curl);
var_dump(json_decode($response, true));
Parameters
Название параметра | Параметр | Тип данных | Описание |
---|---|---|---|
income | non-required | BOOLEAN | if income = 1, returns additional information about earnings |
Result
After the successful completion, you will get a response in the JSON format, in the following form:
json {response:RESPONSE, "balance":BALANCE, "zbalance":ZBALANCE}
Result | Description |
---|---|
response | 1, if the request has been completed successfully, or an error message |
balance | active cash amount. |
zbalance | frozen cash amount. |