For the complete documentation index, see llms.txt. This page is also available as Markdown.

Account Balance

TextCus Balance API allows you to retrieve your total sms, email & wallet balance information from your account. This endpoint can also help you create notifications when your balance is going low.

Endpoint

GET https://api.textcus.com/api/v2/balance

curl https://api.textcus.com/api/v2/balance \
  -H "Authorization: Bearer YOUR_API_KEY"

Headers

Authorization: Bearer API_KEY

Header Parameters

Parameters
Type
Description

apikey

string

Required

Your unique API key is required to retrieve your TextCus balance

Sample Requests

<?php
$url = 'https://api.textcus.com/api/v2/balance';

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => $url,
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'GET',
  CURLOPT_HTTPHEADER => array(
    'Authorization: Bearer API_KEY' // Replace 'API_KEY' with your actual API key
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;

?>

Sample Response

Field
Unit
Notes

sms_rate

GHS

Your price per SMS credit.

sms_balance

credits

Whole SMS credits remaining, not currency.

email_balance

credits

Whole email credits remaining.

wallet_balance

GHS

Spendable cash balance.

whatsapp_balance

GHS

Separate from the wallet. See the WhatsApp API.

SMS and email balances are counts of messages. Wallet and WhatsApp balances are money in GHS. Mixing them up is the most common integration mistake here.

Check your balance on a schedule rather than before every send — one call a minute is plenty, and the send endpoints already tell you when funds run out.


Last updated