Integration Guides

Transaction Flow

Every transfer goes through two phases:

  1. Log: send the full sender, recipient and amount details. Afrisend validates them, checks for duplicates and limits, and returns a transaction_id. The transaction is LOGGED. No money moves yet.
  2. Commit: confirm the transaction_id. Afrisend checks your balance and starts the payout. The final result arrives asynchronously at your callback_url.

Until you commit, you can cancel a LOGGED transaction.

Mobile (M-Pesa)

  1. Call getMobileSubscriberDetails with the recipient's mobile number.
  2. Wait for the callback. Show recipient_data.CreditPartyName to your sender so they can confirm it, and keep the tracking_id.
  3. Call logMobileTranscation with that tracking_id. This is required.
  4. Call commitTransaction.

Bank

  1. Call getAllBanks to get valid bank codes. Cache the list.
  2. Call getBankSubscriberDetails with the bank code and account number (recommended).
  3. Call logBankTranscation.
  4. Call commitTransaction.

Cash Pickup

  1. Call logCashTranscation.
  2. 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.

© 2026 Afrisend