1
Show the operators at checkout
Call
GET /mobile-money/operators?country=MW and let the customer choose Airtel Money or TNM Mpamba. Keep the chosen operator’s refId. The list rarely changes, so you can cache it for a day.2
Create the payment
Call Use your order number as
POST /v1/payments/mobile-money from your server:merchantOrderId, and a new Idempotency-Key for each payment attempt. If your request times out, send it again with the same key. See Idempotency.3
Save the reference and tell the customer to check their phone
Store the
reference from the 202 response against your order. Show the customer a “Approve the payment on your phone” screen.4
Wait for the webhook
PrimePay sends
payment.succeeded or payment.failed to your webhook endpoint. Check the signature, then mark the order paid only on payment.succeeded.5
Confirm before you fulfil
Before releasing goods, call
GET /v1/payments/{reference} and check that status is success and amount matches your order. This also covers a webhook that was delayed.
