Skip to main content

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.

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.

How callback handling works

When you create an M-Pesa Express payment through Moflay:
  1. Moflay sends the STK Push request to Safaricom.
  2. Safaricom sends the payment result back to Moflay.
  3. Moflay matches the result to the payment request.
  4. Moflay updates the payment and transaction status.
  5. Your application reads the result from Moflay.
The callback relationship is between Safaricom and Moflay. Your integration stays focused on creating payments and responding to Moflay transaction statuses.

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

No. Moflay handles Safaricom callback processing for Moflay payments.
Use the payment or transaction status returned by Moflay. You can also inspect transactions in the Moflay dashboard or through the transaction APIs.
Moflay returns a transaction status your application can handle. See Transaction statuses for each status value and recommended action.