Docs
Dashboard Create account

M-PESA STK Push integration

An STK Push sends a payment prompt to the customer's phone. The customer enters their M-PESA PIN and Safaricom returns the result asynchronously.

Payment lifecycle

Status values

StatusMeaning
initiatedRequest received, not yet acknowledged by Daraja.
pendingCustomer prompted, awaiting PIN entry.
successfulPayment confirmed.
failedDeclined, insufficient funds, or a Daraja error.
cancelledCustomer cancelled the prompt.
timeoutNo result received in the expected window.

Verifying a payment

Treat a payment as final only when its status is successful. The safest pattern is to act on the payment.success webhook and then re-fetch the transaction to confirm.


NixPay documentation · A Supreonix product Back to introduction