What to check first

Before you compare plugins or brief a developer, map out how your store works today. A few practical checks will save rework later and make conversations with any provider shorter.

  • Payment method scope: Payment Gateway Kenya supports M-Pesa in Kenya. If your checkout plan depends on other methods, raise that early rather than assuming they can be added.
  • Daraja terms: in Safaricom Daraja, M-PESA Express (Lipa na M-PESA Online) is the prompt-style request started by a business. Safaricom documentation refers to this as 'STK Push'. PayBill and Till are separate transaction types, so be clear which one your current setup uses.
  • Hosting and access: confirm you can install plugins, edit theme files if needed, and receive inbound requests from outside your server. Some managed hosts restrict this.
  • Who owns maintenance: WordPress, WooCommerce and PHP all update regularly. Decide who tests the payment flow after each update.
  • Order handling: list which order statuses your fulfilment team relies on, and what should happen to stock when a payment is not completed.
  • Credential handling: API credentials should be stored outside the public web root and limited to the people who need them.

Build options: API (H2H) or Hosted Payment Page

Payment Gateway Kenya offers two connection routes. They are two ways into the same gateway, not separate products, and the choice mainly affects how much of the checkout you build and maintain yourself.

Custom API (H2H)

Your WooCommerce store talks to the gateway directly, server to server. Your developer builds the payment request, handles the response and processes postbacks to update orders. This suits teams that want full control of the checkout and have someone to maintain the code. H2H is not white-label.

Hosted Payment Page

At checkout, the customer is sent to a payment page hosted by the gateway to complete the M-Pesa payment, then returned to your store. Your store still needs to receive the postback and update the order. This suits stores that want less custom payment code on their own site.

Plugin path versus custom build: what to weigh
QuestionPlugin pathCustom build (API H2H)
Who writes the code?Plugin authorYour developer
Control over checkout layoutLimited to plugin settingsFull
Update risk after WordPress or WooCommerce updatesDepends on plugin maintenanceYour team retests and patches
Availability from Payment Gateway KenyaConfirm with our teamAvailable via API (H2H)

How order status updates work

The key part of any WooCommerce M-Pesa connection is updating the order correctly once the payment result is known. The steps below are an illustrative flow for a pay-in, where the customer pays your store.

  1. Illustrative flow · 1. Customer places the order

    WooCommerce creates the order and holds it in 'Pending payment' while the M-Pesa payment is started.

  2. Illustrative flow · 2. Payment request is sent

    Through API (H2H) or the Hosted Payment Page, the gateway starts the M-Pesa payment and the customer confirms it on their phone.

  3. Illustrative flow · 3. Postback reaches your store

    The gateway sends a postback with the transaction status to your store's endpoint. Postbacks go to the merchant; they are not a notification service for your customer.

  4. Illustrative flow · 4. Store verifies and updates the order

    Your store matches the postback to the order, checks the amount in KES, and moves the order to 'Processing' if paid or 'Failed' if not.

  5. Illustrative flow · 5. Customer sees the result

    Your store shows the outcome on the order confirmation page and sends any customer emails or messages through your own WooCommerce setup.

Frequently asked questions

Answers to common questions from store owners and developers planning a WooCommerce M-Pesa connection.

Does Payment Gateway Kenya have a WooCommerce M-Pesa plugin?

Plugin availability is confirmed with our team. We do not assume a plugin exists for every WordPress or WooCommerce version. A custom build through the API (H2H) is always an option to discuss.

What is the difference between API (H2H) and the Hosted Payment Page?

Both are routes into the same gateway. With API (H2H) your store talks to the gateway server to server and you build the checkout. With the Hosted Payment Page the customer completes payment on a hosted page and returns to your store.

Is STK Push the same as M-PESA Express?

'STK Push' is the market term used in Safaricom documentation for M-PESA Express (Lipa na M-PESA Online), the prompt-style request started by a business. PayBill and Till are separate transaction types.

Will postbacks notify my customer that they have paid?

No. Postbacks send transaction status to you as the merchant. Your WooCommerce store then updates the order and sends any customer messages through your own setup.

When are funds settled to my business?

Merchant settlements are sent on the same day (T+0). This describes when settlement is sent, not when funds are credited to your account.

Can I pay refunds or rewards to customers through the same gateway?

Payouts, where a business pays a customer, are available where confirmed for the account. Ask our team whether payouts apply to your setup.

How much does a WooCommerce M-Pesa connection cost?

Pricing is custom. Talk to sales through the get started page to discuss your store and volumes.

WooCommerce M-Pesa plugin in Kenya: next step