Start
Live payments
The production API at https://api.afripei.co.tz moves real Tanzanian shillings. There is no switch on a live key that turns a collection into a drill.
What the customer sees
A mobile-money collection sends a prompt to the phone. The customer enters their wallet PIN. Until that happens, your payment stays pending and you have not been paid. A control-number collection gives the customer a number to pay from their wallet or bank.
Amount
Send TZS with two decimal places, for example 500.00. Mobile-money collections below 500.00 TZS are rejected before the prompt. The upper bound on that rail is 3,000,000.00 TZS.
When to fulfill
Fulfill on payment.success, from the webhook or from GET /v1/payments/:id. Do not fulfill on 201, pending, or processing.
Payouts
A payout leaves your available balance as soon as it is reserved. Check GET /v1/balance first. The fee is reserved with the amount.
Wallets
Customers pay with M-Pesa, Airtel Money, Mixx by Yas, or Halopesa. Send the phone in E.164, beginning with +255. You do not name the network in the request. The prompt goes to that phone.
A safe first call
Read GET /v1/balance before you create anything. It proves the key and shows what a payout could reserve. The first collection should be an amount you are willing to receive, at or above 500.00 TZS, with an idempotency key you can recognize in your logs.
After it succeeds
Store the payment id against the order. Mark the order paid only from payment.success. The merchant portal shows the same payment, including the wallet and the fee snapshot. A payout uses the same discipline: reserve, wait for payout.success, and treat a failure as a released reservation rather than as money that left.