SMSOnline API Doc
  1. Account
SMSOnline API Doc
  • Preparation
  • FAQ
  • V3
    • Customer API
      • Payments
        • Cryptocurrency via Cryptomus
          • Create new payment
          • Get direct wallet
          • Get transaction status
        • Credit Card via Pay4bit
          • Create new payment
      • Favourites
        • Get favourite services
        • Toggle favourite status
      • Get Account Balance
      • Get invoices
      • Get Coupons
    • Phones API
      • Lookup API
        • Get service list by country and carrier
        • Get service detail by country and carrier
      • Inventory API
        • Get inventory
      • Order API
        • Order a number
        • Get order data
        • Change order status
      • Get Popular list
      • Get all available countries/carriers
    • Statistics API
      • Get statistics
  • V2(Deprecated)
    • Warning: V2 API is deprecated
    • Account
      • Get Balance
        GET
      • Make a top-up with crypto
        GET
      • (Get direct wallet address) Make a top-up with crypto
        GET
    • Lookup
      • Get Available Countries
      • Get Available Services
      • Get Service Details
      • Get the country stats with success rates
    • Manage phone numbers
      • Purchase Number
      • Return Number
      • Request Another SMS
      • Get Status of A Single Number
      • Get Bulk Status of Numbers With Conditions
  1. Account

Get Balance

GET
https://api.smsonline.cloud/cs/getBalance
This API retrieves the account’s current balance.
In addition to the balance, it also returns the total top-up amount and details of the current discount tier, including the applicable discount rate and benefits based on total top-ups in SMSOnline.

Request

Query Params
userId
string 
required
User Id linked to API key
Example:
{{userid}}
key
string 
required
API key
Example:
{{APIKey}}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request GET 'https://api.smsonline.cloud/cs/getBalance?userId={{userid}}&key={{APIKey}}'

Responses

🟢200Success
application/json
Body
error
boolean 
required
body
object 
required
userId
string 
required
The userId associated with the record
balance
integer 
required
Account balance associated with userId
totalCharges
string 
required
The total top-up amount associated with the userId
currentDiscountRate
string 
required
Current discount percentage
discountRates
array [array] 
required
Current discount conditions
Example
{
    "error": false,
    "body": {
        "userId": "123123abc",
        "balance": 500,
        "totalCharges": "1500",
        "currentDiscountRate": "0%",
        "discountRates": [
            [
                8000,
                0.8,
                "-20%"
            ],
            [
                6000,
                0.85,
                "-15%"
            ],
            [
                4000,
                0.9,
                "-10%"
            ],
            [
                2000,
                0.95,
                "-5%"
            ],
            [
                0,
                1,
                "0%"
            ]
        ]
    }
}
🟠401Unauthorized
Modified at 2025-04-18 17:09:38
Previous
Warning: V2 API is deprecated
Next
Make a top-up with crypto
Built with