Safaricom Daraja integration

M-PESA integration that reconciles itself.

We connect your website, app or business system to Safaricom’s Daraja API: STK Push prompts, Paybill and Till confirmations, and automatic matching of every payment to the right invoice, order or account.

Built and tested in our own products · quoted per project

The M-PESA menu on a feature phone
STK Push confirmed · posted
Why Daraja integrations go wrong

Getting the callback is easy. Getting the books right is the hard part.

Plenty of developers can make an STK Push prompt appear on a phone. The trouble starts afterwards: callbacks that arrive late or twice, customers who type the wrong account number, payments that land while your server is restarting, and finance teams who still reconcile the M-PESA statement by hand because the system can’t be trusted.

We have built M-PESA into our own products, RetailPulse for retail and Elimu SMS for schools, where every shilling has to land on the right sale or the right learner. That means handling the full lifecycle: initiating STK Push, registering and receiving C2B confirmations, validating the account reference, matching the payment, posting it to the books, and queuing anything that can’t be matched for a person to review.

We bring the same approach to your system, whether it’s an online shop, a SACCO portal, a school system or an internal ERP.

What we integrate

The full M-PESA payment lifecycle.

We work with your developers or build the whole system for you.

Start a project

STK Push (Lipa na M-PESA Online)

Payment prompts for the exact amount, with the result captured and the order or invoice updated automatically.

C2B Paybill and Till

Confirmation and validation URLs registered with Daraja, so payments to your Paybill or Till are captured with their account reference.

Automatic reconciliation

Each payment matched to the right invoice, order, learner or customer; unmatched payments queued for review.

Retries and idempotency

Callbacks that arrive late or twice are handled safely, so nothing is lost and nothing is counted twice.

Receipts and KRA eTIMS

Receipts by email or SMS, and eTIMS invoicing where your business needs it.

Posting to your accounts

Payments posted to your ledger or accounting system, so the books always match the M-PESA statement.

Questions people ask

Frequently asked questions

What is the Daraja API?

Daraja is Safaricom’s developer platform for M-PESA. It lets your system send STK Push prompts and receive confirmations for payments to your Paybill or Till.

Do I need a Paybill or Till number?

Yes. You need a Paybill or Till number registered with Safaricom, then Daraja API credentials for it. We can guide you through the application.

Can you integrate M-PESA into my existing system?

Yes. We can add Daraja to an existing website, app or ERP, or build a small payments service that your system connects to.

What happens if a customer uses the wrong account number?

The payment is captured and held in an unmatched list for someone to assign, rather than being lost.

How much does M-PESA integration cost?

It depends on your system and the payment flows you need. We quote a fixed price after a short scoping call.

Keep reading

Related guides and products

Start a project

Make M-PESA the easiest part of your business.

Tell us what you want to collect payments for, and we’ll reply within one working day with a plan.