Moflay handles Safaricom Daraja callbacks for you. You do not need to expose a Daraja callback endpoint, configure callback routing, or process raw Safaricom callback payloads in your backend.Documentation Index
Fetch the complete documentation index at: https://docs.moflay.com/llms.txt
Use this file to discover all available pages before exploring further.
How callback handling works
When you create an M-Pesa Express payment through Moflay:- Moflay sends the STK Push request to Safaricom.
- Safaricom sends the payment result back to Moflay.
- Moflay matches the result to the payment request.
- Moflay updates the payment and transaction status.
- Your application reads the result from Moflay.
What your application does
For most integrations, your application should:- Create the payment with Moflay.
- Store the returned Moflay payment or transaction identifier.
- Handle the returned transaction status in your application.
- Check the Moflay dashboard or transaction APIs when you need to inspect a payment later.
What you do not need to build
When you use Moflay, you do not need to:- Expose your own Safaricom callback endpoint
- Configure Daraja callback routing for Moflay payments
- Parse raw Daraja callback payloads
- Map Safaricom result codes to transaction statuses
- Store M-Pesa receipt data from callbacks yourself
Common questions
Do I need to set up Safaricom callback handling?
Do I need to set up Safaricom callback handling?
No. Moflay handles Safaricom callback processing for Moflay payments.
How do I know when a payment is complete?
How do I know when a payment is complete?
Use the payment or transaction status returned by Moflay. You can also inspect transactions in the Moflay dashboard or through the transaction APIs.
What happens when the customer cancels or the request expires?
What happens when the customer cancels or the request expires?
Moflay returns a transaction status your application can handle. See Transaction statuses for each status value and recommended action.