Skip to main content
Powering SA prepaid since 2003 / No monthly fees, ever
SIMcloud bulk airtime and data recharge platform

Quickstart and Wallet Balance API

Start here when you’re connecting an app to SIMcloud for the first time. The wallet balance request uses your API token to read the last balance stored for your account in rand. It gives you a way to check that authentication works without placing an order.

On this page

GET /api/balance.php

Open the API reference

Read the wallet balance

In the portal sidebar, open API → Get Token. Use Current token or ask the account owner to generate a token. Set SIMCLOUD_API_TOKEN in your shell. The response gives the authenticated account’s stored last known balance in rand. Check updated_at where present before using that balance to make a decision.

Store tokens server-side or in a secret manager. The example’s balance is synthetic.

GET /api/balance.php

curl -4 -sS -i "${SIMCLOUD_API_BASE:-https://simcloud.co.za}/api/balance.php" \
  -H "Authorization: Bearer $SIMCLOUD_API_TOKEN"

HTTP 200 response excerpt

{
  "status": "success",
  "balance": 500.25
}

Set up and handle responses

The examples default to https://simcloud.co.za over IPv4 and use SIMCLOUD_API_BASE for a separately configured test environment. Replace YOUR_… fields, example references and any referenced shell variables with values for the intended account. The write examples can create an account, send an SMS or spend wallet funds once filled in.

  1. Send application/json on REST POSTs. Read both the HTTP status and the response status or message.
  2. A missing or invalid token normally returns HTTP 401. Read-only GET requests can be retried with backoff on temporary errors. Use Retry-After when supplied.
  3. After an uncertain POST, check the original request or account history before attempting another write. Keep the original identifiers.

Find the machine-readable API contract

Read the OpenAPI YAML or JSON for request and response schemas. The API index lists the service guides with links to HTML and Markdown. The AI setup guides document MCP separately.

OpenAPI YAML

OpenAPI JSON

Markdown reference index