Daily M-Pesa reconciliation with Claude

Replace the 3-day month-end reconciliation with a 4-minute daily check. One prompt, two connectors, zero spreadsheet work.

Connectors used
Works with
Claude Copilot
Time saved ~3 days → 4 minutes

The problem

Reconciling M-Pesa Paybill collections against Sage invoices means: exporting from Daraja (48-hour window only), exporting from Sage, pasting into Excel, matching manually, emailing the finance team. Three days of back-and-forth every month-end. With Msharti connected to both systems, this becomes a single prompt.

The prompt

Paste this into Claude or Copilot
Reconcile yesterday's M-Pesa collections on Paybill 522533 against Sage invoices and flag any mismatches. Show me:
1. Total collected vs total invoiced
2. Any payments received without a matching invoice
3. Any invoices that were due yesterday but have no M-Pesa payment
4. A summary line I can paste into today's finance report

What fires

  • query_mpesa_history — pulls all transactions from Paybill 522533 for yesterday
  • list_invoices (Sage) — fetches all invoices due yesterday with their amounts and references
  • The AI matches transactions to invoices by amount and reference, flags gaps, and writes the summary

What comes back

M-Pesa collections yesterday: KES 312,400 across 94 transactions

Sage invoices due yesterday: KES 298,750 across 11 invoices

Matched: 10 of 11 invoices (KES 283,750)

Unmatched payment: KES 28,650 from 0722 *** 456 at 14:32 — no invoice found. Possible overpayment or advance.

Unmatched invoice: INV-2026-0441, KES 15,000, Juhudi Hardware — no M-Pesa payment received. Follow up required.

Summary (for finance report): 12 Jun 2026 — Collections KES 312,400 vs invoiced KES 298,750. 1 unmatched payment (KES 28,650), 1 outstanding invoice (INV-2026-0441, KES 15,000).

Variations

  • Reconcile this week's M-Pesa collections against all open invoices in Sage and give me the aged breakdown
  • Which invoices from May are still unpaid? Cross-reference against M-Pesa history for the month
  • Show me the top 10 M-Pesa payers this month who don't have a matching customer record in Sage
ℹ️

Need more than 48 hours of M-Pesa history? Subscribe to the Data Retention add-on (KES 2,000/Paybill/month) to query up to 3 months of transactions.