Skip to Content

Payments & Vouchers

Buy SMS credits with pay-as-you-go vouchers — top up any amount in TZS, above a minimum floor, at a single flat rate tied to the primary SMS provider’s sell price.

How it works

  1. Read the current rate: GET /v1/vouchers/rate.
  2. Create a voucher: POST /v1/vouchers with an amount in TZS.
  3. Credits are computed server-side: credits = amount_tzs / rate_tzs_per_credit (integer division).
  4. The payment is initiated (mobile-money USSD push for snippe, hosted checkout for snippe-session, or manual confirmation for manual).
  5. Once confirmed, credits land on the same account balance as anything else — there is no separate voucher balance.
{ "success": true, "data": { "min_amount_tzs": 1000, "rate_tzs_per_credit": 35 } }

Rate

FieldDescription
min_amount_tzsMinimum top-up amount in TZS
rate_tzs_per_creditFlat credits per TZS rate (1 credit = 1 SMS)

Any leftover TZS below the price of one more credit is not refunded.

Create a voucher

curl -X POST https://api.sendafrica.online/v1/vouchers \ -H "Authorization: Bearer $SENDAFRICA_PORTAL_TOKEN" \ -H "Content-Type: application/json" \ -d '{"amount":10000,"provider":"snippe","phone":"0712345678"}'
FieldTypeDescription
amountintTZS amount to top up
providerstringsnippe (mobile money), snippe-session (hosted checkout), or manual
phonestringRequired for mobile-money providers

Declared-payer OTP flow

When the payer’s number differs from the account phone, verify it first:

POST /v1/vouchers/otp/send {"phone": "0765432109"} POST /v1/vouchers/otp/verify {"phone": "0765432109", "otp": "4921"}

SDK wrappers

Every wrapper exposes rate() and create(amount, provider, phone) with the same semantics.

Last updated on