STK Push at checkout
A single API call sends the payment prompt to the customer's phone with the exact amount and reference. No paybill numbers to remember.
A production-grade Daraja integration: STK Push at checkout, callbacks that survive retries, and a reconciliation engine that matches every payment to its order — without anyone opening a spreadsheet.
The business sold online and collected via M-Pesa, but the reconciliation was manual: someone exported the M-Pesa statement, opened a spreadsheet, and tried to match amounts and timestamps by hand. Every week, hours disappeared — and mismatches quietly piled up.
A single API call sends the payment prompt to the customer's phone with the exact amount and reference. No paybill numbers to remember.
Daraja retries callbacks. Every request is keyed by transaction ID, so a retry is processed once — never double-crediting an order.
Incoming payments are matched to open orders by reference, amount and phone — with a confidence score and manual review queue for edge cases.
When a payment is stuck, cancelled or times out, the right person gets notified instantly — with the order and customer context attached.
Daily settlement summaries, matched vs. unmatched counts, and exportable reports that finance can hand to an auditor without editing anything.
Every request, callback and match decision is logged with a timestamp. Secrets are never in code, and webhooks are validated on receipt.
Each stage is independently observable, so when something goes wrong you know exactly where it stopped.
The app creates an order, generates a reference, and calls the Daraja STK Push endpoint.
The customer receives the payment prompt with the exact amount and business name.
Daraja posts the result to our webhook. The handler is idempotent and always returns 200 fast.
The engine matches by reference, amount and phone, then marks the order as paid or flags it for review.
| Order | Reference | M-Pesa Receipt | Amount | Status |
|---|---|---|---|---|
| #4812 | PF-2025-04812 | SJH7XK9L2M | KES 4,850 | Matched |
| #4813 | PF-2025-04813 | SJH7XK9L3P | KES 1,200 | Matched |
| #4814 | PF-2025-04814 | — | KES 7,400 | Awaiting PIN |
| #4815 | PF-2025-04815 | SJH7XK9L5R | KES 2,300 | Matched |
| #4816 | PF-2025-04816 | — | KES 9,900 | Cancelled |
“We stopped arguing about whether a payment had come in. The dashboard settles it in one line.”
— Finance lead, e-commerce deploymentI build Daraja integrations with proper idempotency, reconciliation and alerting — so your team stops chasing payments and starts trusting the numbers.