Ask any finance manager or accounts clerk at a Kenyan business what their most time-consuming daily task is, and M-Pesa reconciliation will be near the top of the list. Every day, businesses receive dozens, hundreds, or even thousands of M-Pesa transactions — from Paybill payments, Till Number receipts, or customer phone screenshots — and someone has to manually match each one against an invoice, post it to the accounting system, and ensure the Safaricom statement agrees with the books. For many businesses, this takes hours. Some don't even bother doing it daily — they reconcile weekly or monthly, which means outstanding balances are unreliable and cash position is always unclear.
M-Pesa reconciliation software automates this entire process. Here is how it works and what it takes to implement it.
Why Manual M-Pesa Reconciliation Fails
Manual M-Pesa reconciliation using spreadsheets or a simple accounting tool fails in several predictable ways:
Volume Problem
A retail business processing 200 M-Pesa transactions per day generates 6,000 transactions a month. Matching each one to an invoice manually is essentially a full-time job — and mistakes are inevitable at that volume.
Fake Payment Screenshots
One of the most common fraud methods targeting Kenyan businesses is the fake M-Pesa screenshot. A customer presents a screenshot that appears to show a completed payment, but the transaction never happened. Without API-level verification of the M-Pesa code, businesses lose the goods or services and the payment. At scale, this can be a significant loss.
Paybill Account Reference Errors
When customers pay via Paybill, they enter an account reference (usually an invoice number). Customers often enter wrong references — a wrong invoice number, their phone number, their name, or no reference at all. Manual reconciliation means someone has to hunt through the Safaricom statement trying to match "John Kamau" or "0722XXXXXX" to the correct open invoice. This is extremely time-consuming and error-prone.
Timing Differences
M-Pesa transactions in the Safaricom statement appear as at the time of payment. Invoices in the accounting system have their own dates. Manual matching across these two time dimensions adds complexity.
Multi-Branch Complexity
Businesses with multiple branches, each with their own Till Number or Paybill short code, have to reconcile multiple M-Pesa accounts — each with separate statements — against a consolidated accounting system. The complexity multiplies with every branch.
How Automated M-Pesa Reconciliation Works
An ERP system integrated with Safaricom's Daraja API automates reconciliation through two mechanisms:
STK Push (Outbound Payment Request)
For retail and restaurant environments, the cashier initiates an STK Push payment request to the customer's phone number. The customer pays on their phone, and Safaricom sends a real-time callback to the ERP confirming:
- The exact amount paid
- The M-Pesa transaction ID
- The customer's phone number
- The timestamp
The ERP matches this callback to the pending sale automatically, marks the invoice as paid, and posts the receipt to the accounts receivable and bank accounts in the general ledger — all within seconds, without any human intervention. The "reconciliation" step doesn't exist because the payment was always connected to the invoice in the same system.
C2B Paybill Callback
For Paybill-based collections (where customers initiate payment from their own phone), Safaricom sends a callback to the ERP for every incoming payment. The ERP:
- Receives the payment notification with the M-Pesa code, amount, account reference, and phone number
- Attempts to match the account reference to an open invoice
- If the account reference matches an invoice number exactly, the invoice is marked as paid automatically
- If the reference doesn't match (wrong reference, partial reference), the payment is logged as an unallocated receipt that the accounts team can manually allocate with a single search
- All incoming payments are posted to the bank account in the general ledger automatically
The daily Safaricom statement is then used for bank reconciliation: import the statement, and the system matches each line to the already-posted transaction, flagging any differences. This reconciliation takes minutes instead of hours.
End-to-Day M-Pesa Cash Reconciliation
For businesses with cashiers collecting M-Pesa payments throughout the day, the end-of-day reconciliation report shows:
- Total M-Pesa received (from STK Push callbacks)
- Total M-Pesa received (from Paybill callbacks)
- M-Pesa amount per cashier (for STK Push transactions)
- Any pending or failed STK Push requests
- Variance between system total and Safaricom statement total
Any variance is immediately visible and can be investigated that same day — not discovered at month-end when the trail is cold.
Detecting and Handling Failed Transactions
Not every M-Pesa transaction succeeds. Network timeouts, insufficient funds, and customer cancellations all produce failed transactions. A robust ERP handles these gracefully:
- Failed STK Push requests are automatically cancelled after a timeout (typically 5 minutes)
- The invoice returns to "unpaid" status and the cashier is notified
- The failed transaction is logged with the error reason
- Duplicate payment detection ensures the same M-Pesa code is never applied to two different invoices
Setting Up M-Pesa Reconciliation Automation
To automate M-Pesa reconciliation for your business:
- Get a Safaricom Daraja API account — Register at developer.safaricom.co.ke
- Create a production app — Get your Consumer Key, Consumer Secret, and Business Short Code
- Set your Validation and Confirmation URLs — These are provided by your ERP vendor; they point to your ERP's M-Pesa callback endpoints
- Configure your ERP — Enter your Daraja credentials in the M-Pesa settings
- Test with real transactions — Run a few small test payments before going live
BetaSuite M-Pesa Reconciliation
BetaSuite ERP Suite 360 includes a complete M-Pesa integration module covering STK Push for POS and field collection, C2B Paybill callback for bulk payments, automatic invoice matching, GL posting, daily reconciliation reports, failed transaction handling, and a dedicated M-Pesa test console for finance managers. For multi-branch businesses, each branch can have its own Till Number or share a Paybill, with all transactions tagged to the correct branch automatically.
Conclusion
M-Pesa reconciliation is one of the highest-impact automation opportunities for any Kenyan business that accepts mobile money. The time saved — often 2–4 hours per day for businesses processing significant M-Pesa volume — directly translates to reduced staff costs or capacity freed up for higher-value work. The fraud prevention benefit of API-verified payments instead of screenshot-based payments adds further value. And the accuracy improvement in your debtors and cash reporting makes every financial decision more reliable.
See how BetaSuite's M-Pesa integration automates reconciliation for your business type.