GEThttps://onlinesim.io/api/getBalance.php

Get information on current user balance

Returns the current balance of the profile, the frozen balance and — optionally — the income from the referral program.

You might use it to check the balance of the profile to top it up when needed (for example to handle WARNING_LOW_BALANCE exceptions)

Security

OAuth2
sms-scope
grants access to manage numbers for the SMS receiving service from Onlinesim

Parameters

query2
NameTypeDescription
incomeboolean

Information on affiliate program earnings

langstring

Response language:

fr - French,

de - German,

ru - Russian,

en - English,

zh - Chinese.

Please note that the translation applies only to string field values, such as service names or country names. Field names themselves, error messages, and standard values (for example, true/false for boolean fields) remain in English

Enum:frderuenzhDefault:ru

Responses

200

Successful response for getBalance request: the server returns information on your current balance status or throws an exception

Content-Typeapplication/json
Schema
schemaoneOf

Successful response (basic or with details of income from the referral program — depending on the request parameter income) or a common error

One Of
[0]object
[1]allOf
[2]object

Examples

Basic successful response

Successful response about the current and frozen balance of the profile

{
  "response": "1",
  "balance": "106.32",
  "zbalance": 0
}
Successful response with details on referral program income

Extended response with information about the profile balance under the referral program

{
  "response": "1",
  "balance": "106.32",
  "zbalance": 0,
  "income": 12.5,
  "income_usd": 13.2
}

Code Samples

Generating examples...