M-Pesa (Safaricom Daraja) · AsyncAPI Specification
M-Pesa Daraja Callbacks
Version 1.0
The asynchronous callback (webhook) surface of the M-Pesa Daraja API. Daraja delivers the real outcome of collections and funds-movement operations by POSTing JSON to caller-hosted HTTPS endpoints. The integrating business hosts these endpoints and registers/supplies their URLs on the originating request.
Channels
stkCallback
STK Push (M-Pesa Express) result — POSTed to the CallBackURL supplied on stkPush.
c2bValidation
C2B validation request — Daraja asks the biller to accept/reject an inbound payment (opt-in).
c2bConfirmation
C2B confirmation — final notice of a completed inbound customer payment.
resultCallback
Final result for B2C, B2B, Reversal, Account Balance, Transaction Status and Tax Remittance — POSTed to the ResultURL supplied on the originating request.
timeoutCallback
Timeout notice when a queued funds-movement request is not processed in time.
Messages
StkCallback
StkCallback
C2BPayment
C2BPayment
ResultCallback
ResultCallback
AsyncAPI Specification
Work with this as data
Every AsyncAPI spec here is available over the APIs.io API and to AI agents over MCP.