WOOCOMMERCE PLUGIN
Fortpesa for WooCommerce
Accept M-Pesa payments at checkout in your WooCommerce store. Your customer
picks M-Pesa, gets an STK push on their phone, and the order updates itself
once they approve it. Download the plugin and set it up in a few steps.
Download plugin ZIP · 111 KB
Free direct download · WordPress plugin · version 1.1
You need
- WordPress 6.0+ with WooCommerce 7.0+
- PHP 7.4+ on your hosting
- Store currency set to KES — the M-Pesa option only shows at checkout for Kenyan shillings
- A Fortpesa account with an approved payment channel
Set it up
-
Install the plugin
In WordPress go to Plugins → Add New → Upload Plugin, choose
fortpesa-for-woocommerce.zip, then Install Now and Activate.
-
Get your Fortpesa details
In your Fortpesa dashboard, create an API key under Settings → API keys and copy
it right away — it is shown only once. Then note your Channel ID from Channels.
-
Add the webhook
In Fortpesa go to Settings → Webhooks and add
https://yourstore.com/?wc-api=WC_Gateway_Fortpesa. Copy the
whsec_… secret it gives you.
-
Configure the plugin
Go to WooCommerce → Settings → Payments → Fortpesa. Paste the API key,
Channel ID and webhook secret, tick Enable, and save.
-
Optional: customer experience
Under “Customer experience” set your brand colour, business name and receipt footer.
-
Test it
Place a small real order (KES 10 or so) and approve the prompt on your phone. The order
should turn Processing and a receipt should appear.
Good to know
- The M-Pesa option only shows at checkout when the currency is KES and the API key and Channel ID are filled in.
- If an order looks stuck, open it and choose Check Fortpesa payment status from the order actions.
- Errors are logged under WooCommerce → Status → Logs (source
fortpesa). Turn on “Debug log” in the plugin settings for more detail.
- Make sure your Fortpesa wallet has enough credit, otherwise payment requests will fail.