Payment Gateway Kenya: accept M-Pesa payments online through one integration

Payment Gateway Kenya is a payment gateway for businesses in Kenya and for international merchants that want to accept M-Pesa online. Connect through an API (H2H) or a Hosted Payment Page, receive transaction status by postback to your systems, and have merchant settlements sent on the same day (T+0).

Online stores, marketplaces and service businesses can use Payment Gateway Kenya as one connection point for M-Pesa pay-ins.

Home illustration

One integration for M-Pesa payments

Payment Gateway Kenya keeps three payment flows separate. An M-Pesa pay-in is the payment your customer makes at checkout. A customer payout is a transfer from your business to a customer, available only where confirmed for your account. Merchant settlement is the transfer of your funds to you, and merchant settlements are sent on the same day (T+0). Postbacks report the status of each transaction to your systems. Treat each flow as its own process when you plan development, reconciliation and support.

M-Pesa pay-ins illustration
Customers pay you

M-Pesa pay-ins

Accept M-Pesa payments from customers on your website or checkout.

M-Pesa payment gateway
Payouts to customers illustration
You pay customers

Payouts to customers

Payment Gateway Kenya supports payouts as part of the gateway. Whether customer payouts can be enabled for a Kenyan merchant depends on the business and setup, and must be confirmed with our team before you plan around it.

Get started
Same-day merchant settlement illustration
Funds reach you

Same-day merchant settlement

Merchant settlements are sent on the same day (T+0). This describes when settlement is sent. The time your bank takes to credit your account may vary.

Get started
Merchant postbacks illustration
Status to your systems

Merchant postbacks

Postbacks (webhooks) send transaction status to your systems. Your platform then updates the order and decides what, if anything, to tell the customer.

M-Pesa API guide

Cards, Airtel Money, PesaLink and bank transfers are part of the wider Kenyan market, but Payment Gateway Kenya does not offer them. For market context, see our overview of payment methods in Kenya.

Decide early who owns each flow on your side. Developers usually handle the checkout and the endpoint that receives postbacks. Operations staff match orders to payment status, and finance staff reconcile settlements against your own records.

How an M-Pesa checkout moves from order to paid

Below is a simplified view of how responsibilities pass between your checkout, the customer and your systems. It does not describe specific screens or technical steps.

  1. 1

    Checkout

    The customer chooses M-Pesa on your website or Hosted Payment Page.

  2. 2

    M-Pesa payment request

    A payment request is created for the order amount.

  3. 3

    Customer confirms

    The customer confirms the payment on their side.

  4. 4

    Postback to merchant

    The transaction status is sent to your systems by postback.

  5. 5

    Order paid

    Your platform marks the order as paid and handles any customer messaging.

In an order workflow, the postback is the signal your systems act on. Keep the order awaiting payment until a postback arrives, match it to the correct order, and only then release goods or services. If no postback arrives, follow your own policy for open orders rather than assuming the payment went through.

Payment gateway Kenya integration options for your store or platform

Most merchants start from an existing store or an in-house platform. Our integration options are an API (H2H) connection or a Hosted Payment Page. Both are ways to connect to the same gateway, not separate products.

Shopify

Shopify Payments is not listed for businesses located in Kenya, so Kenyan stores need to check the third-party payment providers available to their store. Ask our team whether Payment Gateway Kenya can be connected to your store before you plan around it. For M-Pesa specifics, read our Shopify M-Pesa integration page.

Shopify payment gateway in Kenya

WooCommerce

For WordPress stores, our WooCommerce page covers what to check before you add M-Pesa. Ask our team whether Payment Gateway Kenya can be connected to your WooCommerce build and hosting before development starts.

WooCommerce M-Pesa integration

Custom API

Teams with their own platform can connect by API (H2H) and handle postbacks in their order system. A Hosted Payment Page is the alternative if you prefer less checkout work.

M-Pesa payment gateway

Before you select an integration, check the following points with your team:

  • Whether you can build and maintain an API (H2H) connection, or prefer a Hosted Payment Page
  • How your order system will receive and record postbacks
  • Which M-Pesa flow is agreed for your business
  • How settlement records will reach your finance team

Comparing payment gateways in Kenya

Payment gateways in Kenya differ in the work they leave to you. The table compares three common routes on practical points. It does not rank providers.

Integration routes compared on responsibility, coverage and status updates

Point to check

Payment Gateway Kenya

Integration responsibilityMerchant connects by API (H2H) or a Hosted Payment Page
Method and coverage verificationSupports M-Pesa in Kenya; agree your exact flow with our team
Who receives status updatesMerchant receives transaction status by postback

Direct Daraja integration

Integration responsibilityMerchant builds and maintains the integration with the M-Pesa developer platform
Method and coverage verificationCovers M-Pesa; confirm eligibility and requirements with the provider
Who receives status updatesMerchant's own systems, as configured in the integration

International gateway

Integration responsibilityDepends on the provider's integration options
Method and coverage verificationConfirm whether Kenya and M-Pesa are supported for your business
Who receives status updatesDepends on the provider's setup

Requirements and eligibility change, so verify current terms with each provider before you decide. If you are weighing global options, read our page on Stripe in Kenya or our overview of payment service providers in Kenya.

Payment Gateway Kenya is not Safaricom and does not present itself as part of Safaricom. Provider and method names are used only to describe payment options.

Who uses a payment gateway in Kenya like Payment Gateway Kenya

E-commerce

Online shops can offer M-Pesa at checkout and use postbacks to move orders to paid in their own systems.

Accepting M-Pesa on a website

Online services

Booking platforms and digital services can take M-Pesa payments at checkout and track each transaction status through postbacks to their back office.

M-Pesa payment gateway

International merchants entering Kenya

Businesses launching in Kenya can add M-Pesa through one connection. KYB and local requirements still apply.

Get started

Eligibility depends on KYB, business type and applicable requirements, so not every business will qualify. Some merchants research card checkouts without 3D authentication. Our page on card checkout without 3D Secure and its alternatives explains that topic. Payment Gateway Kenya does not offer 2D or non-3DS processing.

M-Pesa:
the payment method we support in Kenya
Same-day merchant settlement (T+0):
merchant settlements are sent on the same day
Hosted Payment Page or API (H2H)
Postback status sent to the merchant
85% product-wide transaction success rate (successful transactions ÷ all transactions)

For developers: the integration logic

Here is the logic your platform needs, shown at concept level. Technical specifications are shared once your setup is agreed.

Conceptual pseudocode
on customer checkout with M-Pesa:
    create payment request for order
    mark order as awaiting payment
 
on postback received from gateway:
    check it matches an open order and amount
    if payment was successful:
        mark order as paid
        send your own confirmation to the customer
    else:
        keep order open or cancel per your policy

Conceptual only. This is not executable code or an API specification.

Pricing

For current pricing, ask our team or visit our pricing page.

How to get started

  1. Share your business details

    Tell us what you sell, where you operate and how you take payments now.

  2. Agree KYB, fit and your M-Pesa setup

    We review KYB and requirements, then agree the M-Pesa setup available to you. Approval is not guaranteed.

  3. Choose API or Hosted Payment Page

    Pick the integration option that suits your team, then plan postback handling in your order system.

Get started by sending your details to the team.

From the blog

Latest guide

Choosing a gateway

Questions to ask before you choose a provider: coverage, integration effort and status handling.

A guide to comparing gateways

M-Pesa API basics

A developer-focused introduction to M-Pesa API integrations and status handling.

M-Pesa API guide

Browse all payment guides on the blog.

Frequently asked questions

Short answers to common questions from merchants and developers.

Which payment method does Payment Gateway Kenya support in Kenya?

Payment Gateway Kenya supports M-Pesa in Kenya. Cards, Airtel Money, PesaLink and bank transfers are not part of our offer.

How can I connect to Payment Gateway Kenya?

You can connect through an API (H2H) or a Hosted Payment Page. These are two ways to reach the same gateway, not separate products.

Which M-Pesa flow will my checkout use?

The exact flow is agreed with our team during setup, based on your business and requirements.

Who receives transaction status updates?

You do. Postbacks send transaction status to your systems. Customer messaging is handled by your own platform.

When are merchant settlements sent?

Merchant settlements are sent on the same day (T+0). Bank crediting times may vary, so we cannot guarantee when funds appear in your account.

What does the 85% success rate mean?

It is our product-wide transaction success rate, measured as successful transactions divided by all transactions. It is not a guarantee and not a rate for a specific merchant, country or payment method.

Can I send payouts to customers in Kenya?

Payment Gateway Kenya supports payouts as part of the gateway, but whether customer payouts can be enabled for a Kenyan merchant depends on the business and setup, and must be confirmed with our team.

How much does Payment Gateway Kenya cost?

Ask our team for current pricing for your business and setup.

Is every business eligible?

No. Access and onboarding depend on KYB, business type and applicable requirements.

Ready to accept M-Pesa online?

Tell us about your business and we will discuss the M-Pesa setup, the integration option that fits and current pricing. Get started.