Elvis Bitolo

M-Pesa Integration

M-Pesa Integration Developer in Kenya

If your customers pay by phone — and in Kenya, they do — your website should let them pay on their phone too. I integrate Safaricom M-Pesa through the Daraja API so businesses can collect payments and organizations can accept donations directly on their site.

See fixed-price packages
Safaricom Daraja API integration (STK Push)
Checkout and one-off donation flows
Full testing in the Safaricom sandbox before launch
Callback handling and payment confirmation

How M-Pesa integration works

Using the Daraja API, your site sends a payment request to a customer's phone. They enter their M-Pesa PIN to confirm, and Safaricom notifies your site that the payment succeeded. The customer sees a confirmation, and your records are updated automatically.

  • Customer enters amount and phone number on your site
  • An STK Push prompt appears on their phone
  • They confirm with their M-Pesa PIN
  • Your system receives and records the confirmation

Payments and donations

The same integration powers two common use cases: e-commerce checkout for businesses, and donation buttons for schools, CBOs, NGOs and campaigns. I have used it on live donation pages, with clear amounts, confirmations and records.

  • One-off payments for products or services
  • Recurring or goal-based donation pages
  • Clear success and failure messages to the payer
  • A record you can reconcile with M-Pesa statements

Tested in sandbox, launched with confidence

M-Pesa integrations involve real money, so they must be tested carefully. I build and run the full flow in Safaricom's sandbox environment first, then switch to production credentials and verify with a live transaction before handover.

Frequently asked questions

What do I need to accept M-Pesa on my website?

You need an M-Pesa paybill or till number and Daraja API credentials from Safaricom. I handle the technical integration on the site; you handle the Safaricom business account setup, and I can guide you through it.

Can I accept donations as well as payments?

Yes. The same Daraja integration supports both product/service payments and donation flows. I have built donation pages for a school CBO and a political campaign.

Is it safe to integrate M-Pesa on a website?

Yes, when implemented correctly. Credentials are kept server-side and never exposed in the browser, requests are validated, and the flow is thoroughly tested in the sandbox before going live.

Have a m-Pesa payment integration project?

Tell me what you need — you will get an honest answer about what it takes, what it costs and how long it will be.

WhatsAppGet a quote