Integration Guides
Transaction Flow
Every transfer goes through two phases:
- Log: send the full sender, recipient and amount details. Afrisend validates them, checks
for duplicates and limits, and returns a
transaction_id. The transaction isLOGGED. No money moves yet. - Commit: confirm the
transaction_id. Afrisend checks your balance and starts the payout. The final result arrives asynchronously at yourcallback_url.
Until you commit, you can cancel a LOGGED transaction.
Mobile (M-Pesa)
- Call
getMobileSubscriberDetailswith the recipient's mobile number. - Wait for the callback. Show
recipient_data.CreditPartyNameto your sender so they can confirm it, and keep thetracking_id. - Call
logMobileTranscationwith thattracking_id. This is required. - Call
commitTransaction.
Bank
- Call
getAllBanksto get valid bank codes. Cache the list. - Call
getBankSubscriberDetailswith the bank code and account number (recommended). - Call
logBankTranscation. - Call
commitTransaction.
Cash Pickup
- Call
logCashTranscation. - Call
commitTransaction.
Warning: You can commit a transaction only once, and only while it is LOGGED. A second
commit returns 409 Transaction already committed. You can't cancel a committed transaction.