M-Pesa Daraja API Integration in Kenya

Get paid by M-Pesa, and have your records update themselves

Daraja is Safaricom's developer platform for M-Pesa. We use it to connect your website, app or business system to your paybill or till, so customers pay in a few taps and every payment lands against the right order or account.

No more checking M-Pesa messages and updating a spreadsheet by hand.

What we build

  • STK Push checkout

    M-Pesa Express sends a PIN prompt to the customer's phone at checkout. They enter their PIN, and the order is marked paid.

  • Paybill and till confirmation

    Payments made straight to your paybill or till are confirmed in real time and matched to the right invoice or customer account.

  • B2C payouts

    Send money to customers, agents or staff from your system for refunds, commissions and disbursements.

  • Status checks and reconciliation

    Transaction status checks for payments that time out, and daily reports that match M-Pesa records to your sales.

How it works

  1. 01

    Map the money flow

    Which payments come in, which go out, and where each one should be recorded.

  2. 02

    Build and test in the sandbox

    We build against Safaricom's Daraja sandbox, including failed, cancelled and delayed payments.

  3. 03

    Go live

    We help you move your paybill or till shortcode from sandbox to production on the Daraja portal.

  4. 04

    Monitor

    Alerts for failed callbacks and a reconciliation report so nothing slips through.

What usually goes wrong

  • Callbacks that never arrive

    M-Pesa confirms payments by calling your server. It needs a public HTTPS address, and your system must cope when a callback is late or repeated.

  • Cancelled and timed-out prompts

    Customers dismiss PIN prompts or run out of time. Checkout has to show what happened and let them retry without paying twice.

  • Wrong account references

    Paybill customers often mistype the account number. Good matching rules and a review queue save hours of manual work.

  • Exposed credentials

    Daraja keys and passkeys belong in secure server settings, never in website or app code.

Do I need a paybill or till number?

Yes. M-Pesa integration works with a business shortcode (paybill or till) registered with Safaricom. If you don't have one yet, we'll point you to the steps.

Can you add M-Pesa to my existing website?

Usually, yes, whether it's a custom site, an online shop or a business system. We'll look at what you have and tell you the simplest route.

How much does M-Pesa integration cost?

It depends on how many payment flows you need and where the records should go. We quote it with your project after a short call.

Contact

Tell us what you need

A few lines and a rough budget are enough. We reply with questions, next steps and a price range.

We use your details only to reply about your project. No mailing lists, never shared.