If you run a WooCommerce store in Kenya, most of your customers want to pay with M-Pesa. Most WooCommerce payment gateways available here do not speak M-Pesa natively, so stores either lose the sale at checkout or send customers through a manual, error-prone process. This post walks through what it actually takes to accept M-Pesa on a WooCommerce store, and how Boochy M-Pesa does it.
The three ways to accept M-Pesa
There are three real payment modes, and a store only needs one:
- PayBill. Customers pay to your PayBill number. STK Push sends a PIN prompt straight to their phone, no typing an account number by hand.
- Buy Goods (Till). The same STK Push experience, paid to your Buy Goods till number instead of a PayBill.
- Phone Number. No Daraja account needed. Your number is shown at checkout, the customer sends payment manually and enters the M-Pesa transaction code, and you verify the order with one click.
What STK Push actually does
STK Push is the prompt that appears directly on a customer’s phone asking them to enter their M-Pesa PIN to complete a payment, triggered through Safaricom’s Daraja API. The customer never types a PayBill number, account number or amount by hand; they just confirm the amount and enter their PIN. Once they do, Safaricom sends a callback to the store confirming the payment, and the order can move to Processing automatically, no manual checking required.
What you need before you start
- WordPress 6.4 or later, WooCommerce 9.0 or later, PHP 8.0 or later.
- HTTPS on your domain (Safaricom will not send callbacks to a non-HTTPS URL).
- A free Safaricom Daraja account, only if you want PayBill or Buy Goods mode. Phone Number mode needs no API account at all.
How Boochy M-Pesa handles it
Boochy M-Pesa is a WooCommerce payment gateway plugin that adds all three modes above, with real-time STK Push, automatic order confirmation when Safaricom’s callback arrives, and live payment-status polling on the Thank You page so the order updates without the customer refreshing anything. It works with both the WooCommerce Checkout Block and the classic shortcode checkout, and it is built for WooCommerce’s High-Performance Order Storage from the start.
You can test the whole flow in Sandbox mode with Safaricom’s own test credentials before going live, and the customer’s PIN never touches your server: it is entered directly on their phone through Safaricom’s own STK Push dialog.
Full setup steps, the Daraja credentials guide, and a troubleshooting table are on the documentation page. If you would rather see the product first, it is on the Boochy M-Pesa product page.
Boochy M-Pesa is an independent product by Boochy Tech and is not endorsed by Safaricom.