Building a Better Way to Pay: The WooCommerce M-PESA STK Plugin

Karuga Edwin - Jul 7 - - Dev Community

I have always believed that the M-PESA1 Tap card, launched around 2014, was the inspiration for what is today known as M-PESA STK Push. The M-PESA1 Tap never really took off, but the M-PESA STK Push service seems to have thrived. Many online stores such as Jumia and MyDawa, and even physical stores like Carrefour, have implemented STK prompt payment methods. The general public has become accustomed to the STK prompt, establishing trust in the system. It only requires the user to input their M-PESA PIN to confirm payment, with the amount and merchant paybill or till already determined, minimizing chances of error when making payments to merchants.

When I set out to build the WooCommerce M-PESA STK Push plugin, my primary objective was to use it on our WooCommerce sites - AromaBox, Cuppie Menstrual Cups, Bubblewrap, Dehumidifiers, Thermopro and GoExpress Courier Service. My goal was to provide a fast and secure mode of M-PESA payments. Along the way, I decided to sell it to other WooCommerce users who could also benefit from the plugin. Whether you are selling physical, virtual items, or subscriptions, the plugin is ideal. All that is required to implement M-PESA STK payments is a PayBill/Till Number issued directly by Safaricom and a Daraja Account. The plugin has a potential to benefit a much wider audience:

  1. Universal appeal: Whether you sell physical products, digital downloads, or subscriptions.
  2. Effortless setup: All you need is a PayBill/Till No. from Safaricom and a Daraja account.
  3. Seamless integration: The plugin integrates smoothly with your existing WooCommerce store.

I even set up a DEMO site to demonstrate the plugin's capabilities. For testing purposes, I had to use the live API because the official sandbox by Safaricom experiences numerous outages on the callback function. This allowed me to ensure the plugin's functionality in real-world scenarios.

It's been an amazing journey interacting with other SMEs using the plugin for their everyday transactions. Over the years, I have endeavored to improve the plugin, making it a reliable solution for businesses looking to integrate M-PESA payments seamlessly into their WooCommerce stores. The feedback and experiences shared by these businesses have been invaluable, driving continuous enhancements and ensuring the plugin meets the diverse needs of users.

. .