M-Pesa integration

M-Pesa payment integration for websites, mobile apps and business systems.

About this service

We integrate M-Pesa payment services into mobile and web platforms. This can support online stores, service businesses and other applications that need to accept payments.

We agree how the payment process should fit into the application and its existing business workflow.

What the work covers

An M-Pesa integration should connect a payment to the correct order, invoice or subscription. We agree the payment flow, reference format and confirmation rules before connecting the application to the payment service. A prompt being sent is different from a confirmed payment.

From requirements to handover

  1. Review the merchant setup, application workflow and required payment API.
  2. Implement payment requests and a server-side callback endpoint.
  3. Match confirmations to internal records and handle duplicate callbacks safely.
  4. Test successful, failed, cancelled and delayed payments before production rollout.

What to prepare

Tell us whether payments settle invoices, orders or subscriptions, how customers will identify the payment and who handles reconciliation. Prepare access to the appropriate merchant and developer accounts through an agreed secure process. Keep API secrets out of public pages and email attachments.

Common questions

Will an STK prompt immediately mark an order as paid?

No. The system should wait for confirmed payment information and validate it against the expected transaction.

Can you connect M-Pesa to an existing application?

Yes, after reviewing the application, its backend and how payment records are currently stored. Changes to order states or reconciliation may also be required.

Examples and related reading

See how Invoiced connects payments with document access, and read our payment integration checklist.

Other services

Browse our development, integration, hosting and training services.

All services

Tell us what you need to build.

Describe your project and the features you need.

Discuss your project