How to Reconcile Safaricom Daraja Transactions in Excel
27 October 2026 · 7 min read
If you still reconcile M-Pesa payments in a spreadsheet, you can make it accurate before you automate it. This guide covers the Excel method and the failure points that cost ISPs money.
What you need
- The Paybill or Till statement exported as CSV from the M-Pesa business portal
- Your subscriber list with account numbers, packages and amounts due
The Excel method
Import the statement and keep these columns: receipt number, completion time, paid-in amount and the account reference the customer typed.
- Clean the account reference: use TRIM and UPPER so that a typed account number matches your list
- Remove duplicate receipts: use Remove Duplicates on the receipt number, which is unique per transaction
- Match to subscribers: use XLOOKUP on the cleaned reference against your subscriber list
- Compare amounts: subtract the amount due from the paid-in amount to flag short and over payments
Anything XLOOKUP cannot find is an unmatched payment and needs a human decision.
Where Excel reconciliation breaks
- Mistyped account numbers create unmatched payments that sit for days while the customer stays suspended
- Partial payments are easy to treat as full payments
- Timing: a statement is a snapshot, so customers who paid after you exported wait until the next export
- No action loop: finding the payment does not reconnect the customer, someone still has to do it in the router
How Daraja removes the spreadsheet
Safaricom's Daraja C2B API can call a confirmation URL on your server every time a payment lands on your Paybill. The callback carries the transaction ID, amount, time, account reference and payer details, so your system can match and act the moment the money arrives.
A sound integration also does these things:
- Treats the transaction ID as unique so retried callbacks are not counted twice
- Queues callbacks if your server is briefly down and replays them
- Keeps unmatched payments in a queue with the raw payload for audit
- Triggers router reconnection only when the balance is fully cleared
Automate it
Metron ISP receives Paybill confirmations in real time, matches them to subscribers, handles partial payments, reconnects the customer and issues the receipt. Unmatched payments land in a review queue instead of a spreadsheet. See ISP billing with M-Pesa or read our M-Pesa reconciliation guide.