How to Accept M-Pesa on WordPress & WooCommerce: Complete Daraja STK Push Guide
Step-by-step tutorial on integrating Safaricom M-Pesa Daraja STK Push onto your WordPress WooCommerce store. Accept instant payments from Kenyan shoppers.
To accept M-Pesa on WooCommerce: 1) Acquire an active Safaricom Paybill or Till number, 2) Register on developer.safaricom.co.ke to generate Consumer Key, Secret, and Passkey, 3) Install a reputable M-Pesa STK Push plugin or custom webhook listener, 4) Configure live credentials with your Shortcode, and 5) Test live callback verification before taking customer orders.
Google Snippet: How to Enable M-Pesa on WooCommerce
To integrate M-Pesa on WooCommerce: Apply for a Safaricom Paybill or Buy Goods Till, obtain Daraja API credentials (Consumer Key, Consumer Secret, and Passkey) from developer.safaricom.co.ke, install an M-Pesa gateway plugin, set your Shortcode, and run end-to-end sandbox and live STK Push tests.
Over 90% of online shoppers in Kenya prefer paying with Safaricom M-Pesa over credit cards. If your e-commerce store forces customers to manually copy a Paybill number and paste an SMS confirmation code, your cart abandonment rate will easily exceed 65%.
An automated M-Pesa STK Push (Express Checkout) completely solves this friction by sending a prompt straight to the customer's handset. Here is how you can set it up on WordPress and WooCommerce.
Prerequisites for M-Pesa Integration
- A live WordPress website with WooCommerce installed and configured.
- An active SSL certificate (HTTPS is mandatory for Daraja API webhooks).
- A Safaricom Paybill or Till Number issued under a registered business name.
- A Safaricom Developer Portal account (developer.safaricom.co.ke).
Step-by-Step Daraja API Setup
Step 1: Create an App on the Daraja Portal
Log into Safaricom Daraja, navigate to My Apps, and create a new application. Select Lipa Na M-Pesa Sandbox or request production access. Safaricom will issue you two crucial keys:
Consumer KeyConsumer Secret
Step 2: Install an M-Pesa WooCommerce Gateway
You can use established WordPress plugins or partner with developers like Xclusive Tech or Elite Designs Kenya to deploy a hardened, custom webhook implementation that prevents race conditions and duplicate orders.
Step 3: Configure Callback URL & Shortcode
In your WooCommerce Settings > Payments > M-Pesa, enter your Shortcode (Paybill/Till), your Daraja Passkey, and define the Instant Payment Notification (IPN) Callback URL. When a customer inputs their PIN, Safaricom sends a JSON payload confirming transaction status, automatically moving the order from Pending Payment to Processing.
"Building a bulletproof M-Pesa integration requires handling edge cases like network timeouts, insufficient funds, and customer cancellations without breaking inventory sync." — As highlighted in David Esabwa's e-commerce engineering guides.
Pairing Your Store with High-Converting Branding
A functional checkout is only half the battle. Shoppers must trust your site enough to enter their PIN. Professional product photography, polished badges, and crisp graphic elements from creative studios like Cyril Creatives turn casual visitors into confident buyers.
Need help integrating M-Pesa into your store or building a custom e-commerce portal from scratch? Explore our Web Development Services or get in touch today.
Frequently Asked Questions
Answers to common questions Kenyans ask about this topic on Google.

David Esabwa
Co-Founder & Lead Digital Strategist
David Esabwa is the Co-Founder and Lead Digital Strategist at Elite Designs Kenya. Recognized at the Digitally Fit Awards 2026 among Top CEOs Leading Upcoming Digitally Fit IT Firms, David specializes in high-performance web applications, M-Pesa architectures, and data-driven SEO growth systems for Kenyan enterprises.
Ready to Turn Your Website into a 24/7 Revenue Engine?
Whether you need a bespoke corporate platform, automated M-Pesa e-commerce store, or top-ranking local SEO in Nairobi, Elite Designs Kenya delivers measurable results.
Related Digital Guides
Continue exploring expert insights from Elite Designs Kenya.

Guide
Elite Designs Kenya Wins Top Digitally Fit Web Design Firm of the Year
At the Digitally Fit Awards Kenya Edition 2026, Elite Designs Kenya was named Top Digitally Fit Web Design Firm of the Year, with co-founder David Esabwa also honoured individually.
2026-09-20Read →
Guide
Photography Website Design Kenya: Showcase Your Portfolio and Book More Clients
Kenyan photographers need stunning websites to showcase their portfolio. Learn about gallery design, booking systems, and SEO for photography businesses.
2026-07-15Read →

Guide
Consultant Website Design Kenya: Establish Authority and Attract Premium Clients
Consultants and professional service firms in Kenya need websites that establish authority. Learn how to design a consulting website that attracts high-value clients.
2026-07-12Read →