Collect and send
Limits
These are the limits on https://api.afripei.co.tz. A live key moves real TZS. There is no sandbox and no way to mark a request as a drill.
Collection amount
Mobile-money collections are accepted from 500.00 TZS through 3,000,000.00 TZS. An amount outside that range is rejected before a prompt is sent.
Send the amount as a decimal string with two places, for example 500.00. Currency is TZS.
Wallets
Customers and recipients use M-Pesa, Airtel Money, Mixx by Yas, or Halopesa. Send the phone as a Tanzania number in E.164, beginning with +255. You do not send a network name. If the wallet does not have the amount, the payment fails and failure_message says so.
How an amount is written
Two decimal places, always. 500.00 is the minimum mobile-money collection. 3000000.00 is the maximum on that rail. 500 without the decimal places is not the same request. Currency is TZS on every money call.
Payouts
A payout reserves the amount plus the fee from available balance. If available balance cannot cover both, the API returns 409 INSUFFICIENT_BALANCE and does not create a payout. The merchant also has its own payout ceiling. Crossing that ceiling returns 403 LIMIT_EXCEEDED.
Request rates
Limits are counted per API key, except portal sign-in, which is counted per IP address. A limited request returns 429 RATE_LIMITED and a Retry-After header in seconds.
| Action | Limit |
|---|---|
| Create a payment | 60 per minute |
| Create a payout | 30 per minute |
| Reads | 300 per minute |
| Webhook changes | 30 per minute |
| Portal sign-in | 10 per minute per IP |
Ten wrong portal passwords in 15 minutes keep the response “The password is incorrect.” The account stays locked for that window.
Idempotency and webhooks
An Idempotency-Key is kept for 72 hours. The same key and the same body return the original response. Webhook signatures reject a timestamp more than five minutes from the current time. Failed webhook deliveries retry for up to 24 hours. The schedule is on the webhooks page.
What a limit response looks like
A rate limit is 429 RATE_LIMITED. Wait for the number of seconds in Retry-After, then send the same request again. A payout over the merchant ceiling is 403 LIMIT_EXCEEDED. That is not a rate limit. Raising the amount or waiting a minute will not clear it. The ceiling is on the account.
Verification is a limit too
An account that is still waiting for review cannot move money. The response is 403 MERCHANT_NOT_ACTIVE. Creating the key does not open the account. The review does.