callbackUrl. You can also check a payment at any time with GET /v1/payments/{reference}.
Operators
Get the operators with
GET /mobile-money/operators?country=MW and send an operator’s refId as provider when you create a payment. A publishable key is enough for this call.
How a payment runs
1
You create the payment
POST /v1/payments/mobile-money with the amount, the customer’s number, the operator and your merchantOrderId. The payment collects into the account that owns the API key.2
PrimePay answers 202 Accepted
The response has a
reference and "status": "processing". If the operator refuses the request straight away, the answer is 402 with "status": "failed" and a failureCode.3
The customer approves on their phone
This can take a few seconds or a couple of minutes.
4
You get the result
A webhook tells you the payment is
success or failed. Hand over the goods only on success.Fields
Payment status
Check a payment with
GET /v1/payments/{reference}, or find the newest payment for an order with GET /v1/payments?merchantOrderId=ORDER-5531.
Collecting for a sub-merchant (aggregators)
Aggregator accounts collect on behalf of sub-merchants linked to them, withPOST /v1/sub-merchants/{subMerchantCode}/payments/mobile-money. The body is the same as an ordinary payment, and subMerchantCode is the sub-merchant’s 8-digit account code.
The sub-merchant is credited and you keep the fee the sub-merchant agreed to when they accepted your link. That fee can’t be set or changed per payment. Don’t send subMerchantAccountCode or aggregatorFee in the body.
Refunds
POST /v1/payments/{reference}/refunds sends money back to the number that paid, in full or in part. Leave out amount to refund everything still refundable.
- Refunds need a full secret key and an
Idempotency-Keyheader. Payments-only keys are refused. - A refund comes out of the payment’s money not yet settled first, then your available balance. PrimePay’s fee isn’t returned.
- It is
processinguntil the network answers, thensuccessorfailed. A failed refund’s money goes back to your balance. - Several partial refunds are fine until they add up to the payment’s amount.
GET /v1/payments/{reference}/refunds lists a payment’s refunds with refundable (what is left). GET /v1/refunds/{reference} returns one refund.

