Show phone WhatsApp email us
Payments · Safaricom Daraja

M-Pesa integration that reconciles itself

STK Push, paybill and till collections, payouts, status and reversals, built on the Safaricom Daraja API and wired into the system you already use. With the logging and reconciliation that keeps it trustworthy.

How STK Push works

One prompt to the phone, one callback to your system

You send the amount and the customer phone number. Safaricom pushes the "Enter PIN" prompt. When they pay, Daraja calls your system back with the receipt number. We capture it, match it to the invoice and confirm the sale.

The same plumbing handles C2B, B2C and status queries. Build it once, reuse it everywhere.

Talk through your flow
POST /mpesa/stkpush · Daraja
request // STK Push
  "BusinessShortCode": "174379",
  "Amount": 2500,
  "PhoneNumber": "2547........",
  "AccountReference": "INV-4471"
callback // result
  "ResultCode": 0,
  "MpesaReceiptNumber": "SJ51..K2"
Receipt matched to INV-4471 and posted to your ledger.
What we build

The full Daraja toolkit

You rarely need all of it on day one. We build what your flow requires and leave room to add the rest.

STK Push (Lipa na M-Pesa online)

Push a payment prompt to the customer phone. They enter their PIN, you get a callback with the receipt. The cleanest checkout for web, USSD and apps.

C2B collections

Paybill and till payments flow straight into your system, matched to an invoice or account number. No more reading SMS by hand.

B2C payouts

Send money out, refunds, supplier payments, loan disbursements, salaries, with results confirmed back to your records.

Status & reversals

Query a stuck transaction, confirm a result, or reverse a wrong payment, all from your own dashboard.

Reconciliation

Every transaction stored, matched and totalled. A daily report that agrees with your M-Pesa statement by 8am.

Callback validation

We validate every callback, handle duplicates and retries, and keep an audit trail, so a flaky network never costs you a payment.

Where it is used

Common M-Pesa flows we have shipped

Fee & invoice collectioneCitizen & county revenueE-commerce checkoutSupplier & refund payoutsLoan disbursement & repaymentPrepaid water/token vendingSACCO deposits & withdrawals
eCitizen payments too. If you collect government, county or parastatal fees, we integrate the eCitizen platform the same way: customers pay on eCitizen, and we reconcile every transaction back to your billing system or ERP.
The messy parts are where projects usually fail: duplicate payments, missing receipts, a callback URL that times out, a customer who pays the wrong account. We have hit all of these in production and build for them from the start.
Questions

M-Pesa integration, answered

Yes. We build on the official Safaricom Daraja API. We can work with your existing paybill or till, or guide you through getting one and moving it from sandbox to production (go-live).
That is most of what we do. We integrate M-Pesa into ERPs, billing systems, custom portals, websites and apps. If your system has no API, we add a small middleware layer that bridges the two.
Every request is logged with its checkout ID. Callbacks are validated, duplicates are ignored, and anything missing is reconciled against a status query. You see failures in a dashboard, you do not lose them.
A straightforward STK Push or C2B integration is usually a couple of weeks once we have Daraja access. Reconciliation, payouts and edge cases add time. We give you a firm timeline in the quote.

Ready to take M-Pesa payments properly?

Tell us your paybill or till, your system and your volumes. We will scope the integration and give you a price and a timeline.