Balance and pricing
Prepaid wallet, per-segment pricing and alerts.
AppStract SMS is prepaid. You top up a wallet in cedis, and each message is paid for from it when you send it.
Your price
You pay a fixed price per segment. See it with GET /pricing:
{ "currency": "GHS", "pricePerSegment": "0.04" }A message costs segments × pricePerSegment. See Segments and encoding.
Your balance
curl https://api.appstractone.com/v1/balance \
-H "Authorization: Bearer $APPSTRACT_API_KEY"{ "balance": "19.96", "currency": "GHS", "lowBalanceThreshold": "10" }If your balance is too low for a message or batch, the request fails with 402 and the code insufficient_balance. Nothing is sent.
Low-balance alerts
Set a threshold, and we will email you and send a balance.low webhook when your balance falls below it:
curl -X PUT https://api.appstractone.com/v1/balance/alert \
-H "Authorization: Bearer $APPSTRACT_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "threshold": 10 }'Send "threshold": null to turn alerts off.
Wallet transactions
Every top-up, charge and refund is recorded. List them with GET /wallet/ledger.