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
- Read the current rate:
GET /v1/vouchers/rate. - Create a voucher:
POST /v1/voucherswith an amount in TZS. - Credits are computed server-side:
credits = amount_tzs / rate_tzs_per_credit(integer division). - The payment is initiated (mobile-money USSD push for
snippe, hosted checkout forsnippe-session, or manual confirmation formanual). - 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
| Field | Description |
|---|---|
min_amount_tzs | Minimum top-up amount in TZS |
rate_tzs_per_credit | Flat 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"}'| Field | Type | Description |
|---|---|---|
amount | int | TZS amount to top up |
provider | string | snippe (mobile money), snippe-session (hosted checkout), or manual |
phone | string | Required 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