By Donald N.K. | Category: Fintech | Published April 5, 2026

M‑PESA Integration & Agent Till Reconciliation – The Complete Guide (with Case Study)

M‑PESA processes over 2 billion transactions monthly in Kenya, yet many businesses still reconcile manually using Excel, leading to errors and fraud. This guide covers two crucial topics: (1) integrating M‑PESA payments into your website or app using the Daraja API, and (2) automating daily reconciliation for M‑PESA agents and businesses with multiple tills using our Mpesa Agents Tills Daily Reconciliation App.

Part A: Integrating M‑PESA Payments (STK Push & C2B)

Our team has implemented M‑PESA for e‑commerce sites, billing systems, and schools. We offer ready‑to‑use libraries for Laravel, WordPress, and Node.js.

STK Push (Lipa Na M‑PESA Online)

Initiate a payment prompt directly on the customer’s phone. Steps:

  1. Collect the customer’s phone number and amount.
  2. Call the Daraja API’s STK push endpoint.
  3. M‑PESA prompts the user to enter PIN.
  4. Receive callback with success/failure and transaction ID.

Our library handles all retries, timeouts, and logging. We also provide a reconciliation cron job that matches successful callbacks with internal orders.

C2B (Paybill/Till Number)

For receiving payments via Paybill, we set up a validation URL and confirmation URL. The system automatically updates the customer’s account balance or marks an invoice as paid.

We have integrated Paybill for over 20 organisations, including a university that collects KES 200M+ annually via M‑PESA.

Part B: Agent Till Daily Reconciliation App (Built for Supermarkets & M‑PESA Agents)

We developed this app for a client with 4 shops, 10 counters, and 15 M‑PESA agent lines. Manual reconciliation took 3 hours nightly; our app cut it to 15 minutes.

How it works (detailed)

  • Setup: Define shops, counters, and services (each M‑PESA till number is a service).
  • Start of day: Teller records opening cash (notes & coins) and float balances for each service. Optionally record Cash IN (cash added) or Cash OUT (cash removed).
  • End of day: Teller enters closing cash, final floats, total deposits, total withdrawals, and total added float per service.
  • Reconciliation: System calculates expected cash = opening + float adjustments + deposits - withdrawals - added float. Compares to actual cash. Any discrepancy (excess or loss) is flagged immediately.
  • Reports: Admin can view cumulative monthly summary per counter and email a PDF to the accountant.

We deployed this on a cloud server, accessible via web browser on any device (even a phone). Training took 2 days; after that, no human errors.

Additional advanced features:

  • Role‑based access: tellers only see their own counters; admin sees all.
  • Audit trail: every entry is timestamped and linked to a user.
  • Automated email reports: every night at 10 PM, the system emails a summary to management.
  • Integration with M‑PESA API (optional): automatically pulls transaction lists to pre‑fill deposit amounts.

Automate Your M‑PESA Reconciliation Today

Pricing starts at KES 15,000 for a single shop, KES 5,000/month for multiple shops (includes hosting).

Request a Demo of the Reconciliation App