Business

How to Accept M-PESA Payments on a Website in Kenya

How to Receive Mpesa Payments on a Website

Fact-checked on

In this article
  1. What you need
  2. Choose a payment route
  3. Set up and test
  4. Sources and useful links

A Kenyan website can accept M-PESA through manual payment instructions, a payment gateway or direct integration with Safaricom’s Daraja APIs. Choose a route that fits your order volume, website platform and ability to support it.

What you need

Have the appropriate merchant account or approved payment-provider account, your business onboarding documents and a clear way to match each payment to an order. Confirm charges and settlement terms with the provider you choose.

Choose a payment route

Route How it works What to plan for
Manual Till or Paybill instructions Display the business payment details and ask the customer to supply an order/payment reference Staff must reconcile payment against merchant records before fulfilment
Payment gateway An approved provider handles checkout and offers an API or supported plugin Merchant approval, transaction charges, settlement, supported payment methods and maintenance
Direct Daraja integration Your developer integrates the appropriate Safaricom API services Production approval, secure backend processing, callbacks, reconciliation and ongoing support

Pesapal, for example, publishes official integration documentation and extensions. Website payment integration is not restricted to WordPress: check the provider’s current documentation for your exact platform and version.

Set up and test

  1. Decide how orders will be identified and what happens when payment is delayed, cancelled or unsuccessful.
  2. Complete merchant onboarding using the provider’s official channels.
  3. Use the supported integration or develop against the official API documentation. Keep secret credentials on the server.
  4. Test successful, failed, duplicate and delayed transactions in the supported test environment.
  5. Confirm the payment’s status, amount and order reference through trusted provider records before marking an order paid.
  6. Move to production only after approval and successful tests. Reconcile receipts and settlements and document your refund process.

A customer’s name, phone number or screenshot alone does not prove payment. An initiated M-PESA prompt is also different from a completed transaction.

Tip: Ask who will maintain the integration when the website or provider changes. An abandoned plugin can create costly checkout problems.

How to Receive Mpesa Payments on a Website

Leave a Reply

Your email address will not be published. Required fields are marked *