Simulate STK Push
Create pending local transactions and move them into success, failure, or timeout states.

Unofficial local sandbox for M-Pesa Daraja API integrations. Build, test, and debug STK Push flows, callbacks, transaction states, and payment edge cases locally before going live.
daraja-local start
curl http://127.0.0.1:8080/health
# Create STK Push → save CheckoutRequestID → approve/fail/timeout → receive callbackDaraja Local gives developers a repeatable payment sandbox that behaves like the Daraja integration surface without touching Safaricom or moving real money.
Create pending local transactions and move them into success, failure, or timeout states.
Send Daraja-style webhook payloads to your app and confirm callback handling.
Reproduce failed callbacks, insufficient funds, timeouts, and final-state transitions.
Debug the in-memory transaction store, raw requests, state, and callback attempts.
The immediate STK Push response is only an acknowledgement. Your app should wait for callbacks or query status before finalizing payments.
Your app sends a Daraja-style STK Push request to /mpesa/stkpush/v1/processrequest.
Daraja Local returns IDs and stores the transaction as PENDING in memory.
Approve, fail, timeout, or replay the callback to validate your application logic.
Use the guides to install the CLI, start the emulator, test OAuth, create STK Push requests, simulate outcomes, replay callbacks, and inspect transactions.