Payment Plugins

Woocommerce Mpesa Payment gateway plugin - Wordpress

How to download, Install and setup the woocommerce Mpesa plugin on a wordpress websites.

Just the other day, I had the privilege to integrate the Mpesa API on a wordpress ecommerce website running on woocommerce and I can tell you it is something you cannot avoid doing as a netpreneur in any country that accepts Mpesa mobile money. In this wordpress woocommerce plugin, your customers will shop on your woocommerce shop, add goods or services/subscriptions to cart, proceed to checkout and choose Mpesa as their preferred Payment method. When entering their billing details, they will enter their mobile phone number and when they click proceed, an STK push will be sent to their phone number by the Mpesa API system so that they only enter their Mpesa Pin and complete the transaction. As soon as they make the payment, the system will automatically receive the payment and autocomplete the purchase process. This is the power of the Mpesa API.

Before I even did this successfully for a client, I had met the following questions from many clients and I will take a few minutes to clarify so you are the best informed when making a decision to add the Mpesa Payment gateway to your woocommerce shop.

Does WooCommerce support M-PESA?

We have developed an Mpesa plugin that work with any woocommerce shop. Therefore, YES, Woocommerce does support M-pesa. What specifically you need to know is that you have to engage a plugin developer to extend the core woocommerce plugin with the M-pesa plugin and we are here to help you.

How do I integrate M-PESA into my website?

To integrate M-pesa into your website, you need some knowledge in the programming language or CMS or framework or simply the technology used to develop it and use the Daraja API to integrate this API onto your website. You can do this yourself or hire a developer or download a ready-to use plugin that solves the M-pesa integration service on to your website.

Does WooCommerce work in Kenya?

A big YES. Woocommerce does work in Kenya in that you can easily install woocommerce onto your wordpress website and serve your online business within Kenya and also serve Kenyans. Woocommerce is therefore available in Kenya. You can download a copy of the official woocommerce website here.

Does M-PESA have an API?

Capital YES. M-pesa have an API which is found on Daraja. Find details about the Mpesa API on developer.safaricom.co.ke

M-pesa plugin for woocommerce per country.

Just as M-pesa serves many countries, we also have different Woocommerce M-pesa payment gateway Plugins for those different countries. This is because in each of those countries, M-pesa provides different APIs to integrate to. Find these in the table below:

Country Mpesa API Mpesa WC plugin
Kenya developer.safaricom.co.ke Mbiki WC mpesa Ke
Tanzania openapiportal.m-pesa.com Mbiki WC mpesa Tz

Integrating Mpesa C2B with your WooCommerce is very easy. With the assistance of our Woocommerce payment gateway plugin, you can simply install, do a small set up and activate and the rest is taken care of. You will be now very ready to receive Mpesa payments for your goods and services displayed on your woocommerce (WC) powered wordpress website.

Introduction to our Woocommerce Mpesa plugin.

Woocommerce runs on Wordpress and is said to be the future of of ecommerce. We therefore see it good to help you integrate your Woocommerce with Mpesa (For Kenyans). In this article, I will explain how it is easy to take advantage of PayMents now that we support Mpesa deposits and Payments if you are running a woocommerce website.

I have met people online who want a free version of this woocommerce Mpesa plugin. Let me say this: With the experience of working with Mpesa APIs for some years now and having seen the way the Mpesa API has been transforming over years from VPN ways, G1, G2 and now Daraja and may be we do not know what will happen tomorrow, a free version of a woocommerce Mpesa gateway plugin is not a sure bet. The best is a paid one with support from the developer so that you are assured of your ecommerce business future. Well, there are free versions out there but most of them have missing features that will be offered in their Pro or Premium versions.

How to download and install this woocommerce Mpesa payment Gateway plugin:

To download and install this Mpesa for woocommerce plugin, you need to follow well the following steps:

  1. Go to this linke: https://www.payment-plugins.com/support
  2. Enter your email address to receieve an OTP
  3. Enter the OTP via the next step to be allowed to Login and click Proceed to Login. You can also Retry the process by clicking the Retry link on same page.
  4. Click New Intergration button
  5. Choose your country where your Woocommerce Mpesa plugin will work in. This ensures you get a Wordpress plugin integrated to the right Mpesa API.
  6. Choose the Mpesa Payment gateway
  7. Select Woocommerce on the Technology selection options
  8. Enter Mpesa credentials as Given by Safaricom. The API mode can either be sandbox or Live and their relevant credentials are from Dara and safaricom.
  9. Click Integrate now Link and your Woocommerce Mpesa plugin will be compiled and a download Link presented to you on the resultant page.
  10. Click the resultant download Link to get your ready plugin download onto your computer.
  11. You can now proceed with the next steps to Install your Mpesa WC plugin on your Wordpress websites.

How to Install the downloaded Woocommerce Mpesa plugin for wordpress:

Having saved your Mpesa Wc plugin download on a preferred location in your desktop, it is time to install it.

Note: You do not need to enter further settings as it came ready to work. You can always test it by Going to your wooocommerce shop link, add a product or service to cart, proceed to checkout and choose the Mpesa Menu. It will allow you to receive an Mpesa STK PUSH popup form where you can simply enter Mpesa PIN to complete the paymenta nd the rest of the woocommerce logic isn automatically completed and order marked as "processing" which means Mpesa payment has been automatically received. That is the purpose of the Mpesa API, to automate the purchase process so that you do not need to manually verify Mpesa payments and match with customers and orders.

2. After you have the Paybill number with you, contact MpesaBusiness via email (MPESABUSINESS@safaricom.co.ke) or phone (2222) and you will be given some requirements to send via their email so that they create an admin account which will allow you to access the Mpesa portal. This is the account which will enable you to create other operators on the Mpesa portal.

Recall the admin account on the Mpesa portal. We will need it.

Now, let us dive into the Integration of Woocommerce plugin with Mpesa.

Note: We have made the technical parts very easy for you. Your work is to copy and paste what we tell you to copy and paste where we tell you to.

Step 1: You need our Mpesa API integration assistant.

This is a ready PHP script which you will need to install in your server.

Below is the Mpesa API integration Assistant.

Note: In later releases, we have provided it inside Woocommerce plugin. So, no need to worry.

However, you need the steps below.

These steps are the ones which will guide you step by step, in an easy user-friendly way to have your PayBill set up.

The advantage of this Script is that, while it offers a quick and easy way to set up Mpesa C2B Paybill integration, it also comes with it more Payment gateways. In short, you are integrating your Woocommerce with multiple other Payment methods and you can activate and deactivate Payment methods on it as you so wish. It is all upon you and depends on the PayMents methods you need; Mpesa included.

Step 2: The above script will require that you provide some Mpesa C2B parameters. Login the admin of the script and locate the Mpesa C2B settings.

a). Register url (prefilled)

b). Confirmation url (prefilled)

c). Validation url (prefilled)

d). Paybill number (Fill this)

c). Mpesa Portal username (Fill this).

Save the above settings.

Step 3. Go To www.developers.safaricom.co.ke and create an account. Also, create a Sandbox/Test App and Move it to production by Click "GO live" and following the instructions there.

Step 4. When this production App is approved by Safaricom (Normally takes 2 to 3 business days), you will now have a Consumer Key and Consumer secret of the production Version of your App.

Step 5. Note the login to the Developer portal.

a). Go back to the PayMents processor and on the administration Block 2,==> C2B Mpesa settings, enter it as the Mpesa security token and save. ).

b). Consumer Key (Fill this as per your App on Safaricom Developer portal).

c). Consumer secret (Fill this as per your App on Safaricom Developer portal).

 

Step 6. Now, Click the "register urls" button  below the above settings.

A success message means everything is okay.

Everything is okay now.

Test with a transaction by sending some money to your Paybill.

You should see a transaction under the administration Block 3 --> Mpesa transactions.

You are done on Mpesa integration and now Mpesa is sending transactions to your Database.

Look at the PayMents balance, it is increasing when you make a Payment.

Step 7. Now, we need to have Mbiki Lipa na Mpesa for WooCommerce as one of the Payment options on your woocommerce website when people order and are paying.

You need to download the Mbiki Lipa na Mpesa for WooCommerce plugin and install it like a Normal Wordpress plugin.

Activate it and set up some needed info found on Woocommerce ===> Settings ===> Payments/Checkout

You are done now.

Anytime someone selects the Lipa na Mpesa option, he or she will be directed to make payments via your Mpesa Paybill and the payments are automatically captured and order processed.