Webhooks / Callback Url
The webhooks/callback url provide real-time notifications after successfully consuming the API. These events could range from a successful transaction to a failed transaction.
The webhook/callback url should be valid for your system to get a response. If your server or webhook is not reachable, we try a maximum of 4 times, every 120 seconds to reach the webhook.
Some examples of events that you could be notified of include:
When you receive a payment transaction.
When you performed a successful payout transaction.
When you performed a failed transaction.
Sample webhook response on a successful Mpesa payment:
Some examples of things you could do with our webhooks include :
Update your database when the status of a pending payment is successful.
Notify a customer when payment is successful or unsuccessful etc.
Sample webhook response on failed payment:
For more information on the webhook responses check them out on Mpesa Payments, Card Payments, Mobile Payouts and Domestic Bank Payouts.
Last updated