Integrations3 November 2026· 9 min read· Enet Integrations Team8 views0 found this helpful

Automating M-PESA Payment Reconciliation: Stop Matching Statements by Hand

How to automatically match Paybill and Till payments to invoices, customers and accounts — and handle wrong references, partial payments and overpayments.

A finance manager reviewing a payment reconciliation dashboard with matched transactions

For many Kenyan businesses, M-PESA is the main payment channel. Yet in countless offices, someone still downloads statements, scrolls through hundreds of lines and ticks off payments against invoices in a spreadsheet. It is slow, error-prone and delays receipts to customers. Automation solves it.

Why manual reconciliation breaks down

  • Customers type the wrong account number or none at all.
  • One customer pays several invoices in one transaction — or one invoice in several instalments.
  • Someone else pays on the customer's behalf from a different phone number.
  • Payments arrive on weekends and at night, but are only processed during office hours.
  • Staff time spent matching could be spent serving customers.

How automated reconciliation works

  1. Capture every payment in real time using C2B confirmation URLs for direct Paybill/Till payments and STK Push callbacks for checkout payments.
  2. Match automatically using rules: exact account reference → invoice; phone number → customer; amount and date → open invoice.
  3. Allocate the payment to one or more invoices, handling partial payments and overpayments as credit.
  4. Notify the customer instantly by SMS, email or WhatsApp with a receipt.
  5. Queue exceptions — payments that cannot be matched go to a short review list instead of being lost.
  6. Post to accounting and, where required, issue the KRA eTIMS invoice.

Design tips for cleaner matching

  • Use Paybill account references that are short and meaningful — invoice number, admission number, house number or member number.
  • Prefer STK Push at checkout so the reference is filled in automatically — see STK Push explained.
  • Validate references with a C2B validation URL where your setup allows, rejecting obviously wrong account numbers.
  • Store the M-PESA receipt number as a unique key to prevent double posting.
  • Run a daily statement check against M-PESA records to catch anything a callback missed.

Industry examples

  • Schools: fees paid with admission numbers post straight to the student ledger and parents receive SMS receipts — see school management.
  • SACCOs and lenders: repayments update loan balances and penalties instantly — see loan management and chama software.
  • Landlords: rent is matched by house number and arrears update automatically — see rent management.
  • Online businesses: orders and hosting invoices are marked paid in seconds through WooCommerce and WHMCS integrations.

Bank payments too

Many businesses also receive bank transfers and card payments. The same rules-based approach works with bank statements and APIs through our banking integrations, giving finance a single view of all collections.

The payoff

  • Hours of manual work saved every week.
  • Customers receive receipts instantly, reducing "have you received my payment?" calls.
  • Accurate, real-time cash position for management.
  • Clean audit trail for tax and compliance — see our eTIMS compliance checklist.

Developers can find API details on Safaricom's Daraja portal and in our Daraja integration checklist. Want it done for you? Explore M-PESA integration or talk to our team.

Share this article

Was this article helpful?

Your vote helps us write better guides.

Need a hand implementing this?

Enet engineers in Nairobi handle migrations, SSL installs, M-Pesa and eTIMS integrations for you.

Launch today

Powering Your Online Success!

Domain, hosting, email and SSL from one local team — set up in minutes and backed by people you can call.

  • Free SSL
  • Free migration
  • 99.9% uptime
  • 24/7 expert support

Start with your domain

Check availability, then add hosting in the same order.

Prefer to talk? Call +254 726 872 512