• Home
  • About
    • Overview
    • Our Experience
    • Join our team
  • What we do
    • Communications & PR
    • Marketing & Advertising
    • Design, branding & printing
    • Events Management
    • Digital Solutions
    • Film & Video Production
    • Professional Photography
  • Our Work
  • Our Blog
  • Contacts
  • Request a Quote
  • Privacy Policy
  • Terms of use
✕
How to Start a Blog and Make Money Online – The Ultimate Beginner’s Guide
September 6, 2022
Netflix announces 46 beneficiaries of its Creative Equity Scholarship Fund in East Africa
October 11, 2022

How to integrate MPESA stk push in woocommerce WordPress website

September 24, 2022
Categories
  • Integrations
Tags
  • mpesa
  • mpesa integration
  • stk push
  • woocommerce
  • wordpress
Integrating-Woocommerce-MPESA-payment-to-your Wordpress website

Firstly, we have looked at how to integrate MPESA into a custom PHP website, and a Laravel website. Therefore,  let’s look at M-Pesa STK Push integration into a WordPress woo commerce website. In this article, we are going to show you how to integrate mpesa in WordPress woocommerce using a plugin.

Step 1: Set up App on Safaricom Daraja Portal

First things first, we have to set up the mpesa app on the Safaricom daraja platform. The next step is to create a new sandbox app by clicking on the Add a New App button and giving it a name. Ensure you select both Lipa na Mpesa Sandbox and Mpesa Sandbox and hit Create App button. Finally, copy the Consumer Key and Consumer Secret.

Safaricom Daraja Portal

In the next steps, let’s go to our woocommerce WordPress website. Woocomemerce is an open-source e-commerce plugin built on WordPress to make it an e-commerce store. Therefore, the first requirement would be to install the woocommerce plugin to your WordPress website. Go to your WordPress admin and follow these steps:

 

Step 2: Installing Woocommerce

  1. On the left darks section, go to Plugins then Add New.
  2. In the search bar, type “WooCommerce”.
  3. Click Install Now on the plugin by Automattic.
  4. Click Activate Now.

Installing Woocommerce in the WordPress Admin

Step 3: Installing Woocommerce MPESA Payment plugin

With the woocommerce plugin installed, let us now add the WooCommerce MPESA Payment plugin. The mpesa WordPress plugin will enable us to easily add an option of paying for goods using M-PESA.  Download the mpesa plugin here. Install the WooCommerce MPESA payment gateway plugin by choosing the upload option.

To set up our mpesa payment gateway, go to Woocommerce > Configure MPESA

 

Step 4: Fill in your app and business details

Fill in the details below: Environment (Sandbox for testing and Live when active), Identifier type (Till number or paybill), Store number, business shortcode, App Consumer key, App Consumer Secret, Online Pass Key and Account reference.

Setting up WooCommerce M-PESA payment plugin

Step 5: Test the STK Push

Lastly, once you have filled in the mpesa setup details, your store is ready to send stk push to customers to make payments via mpesa.

The checkout should look something like the one below.

Testing mpesa stk push in woocommerce wordpress website

When the user enters the phone number, an STK Push is triggered on the phone to complete the order purchase.

MPESA STK Push on phone

That’s how you set up stk push mpesa woocommerce. Thank you.

Share
95
Anselm Muchura
Anselm Muchura
Software developer and Graphic designer

Related posts

August 1, 2022

Integrate MPESA Payment API to your Laravel Website


Read more
April 20, 2022

Lipa na MPESA STK-PUSH Integration to your PHP Website [UPDATED]


Read more
March 17, 2022

MPESA C2B API Integration to your PHP Website


Read more

1 Comment

  1. Fabian says:
    December 30, 2022 at 1:32 PM

    I am using sandbox mode but I am getting (M-Pesa Error) 404.001.03: Invalid Access Token… What could be the problem…

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

More Blog

  • 0
    Readily available free online editing Tools for non-profits
    March 6, 2023
  • 3 Reasons why Digital Marketing is important for businesses in Kenya0
    3 Reasons why Digital Marketing is important for businesses in Kenya
    February 11, 2023
  • 0
    Introduction to Email and Web Security – Examples and Best Practices
    January 30, 2023
  • Brand Launch 3 tips to a Successful Brand Launch for all Businesses0
    Brand Launch: 3 tips to a Successful Brand Launch for all Businesses
    November 24, 2022
  • How to make an Impactful Documentary films - A Step By Step Guide0
    How to make Impactful Documentary film – A Step By Step Guide
    November 1, 2022
  • 0
    Netflix announces 46 beneficiaries of its Creative Equity Scholarship Fund in East Africa
    October 11, 2022
  • Integrating-Woocommerce-MPESA-payment-to-your Wordpress website1
    How to integrate MPESA stk push in woocommerce WordPress website
    September 24, 2022
  • 1
    How to Start a Blog and Make Money Online – The Ultimate Beginner’s Guide
    September 6, 2022

Request a Quote

Give us a bit more detail here. Links to examples are very helpful. Feel free to include any questions you might have.

Quick links

  • Who we are
  • What we do
  • Our Work
  • Our Blog
  • Join our team
  • SDGs

Our Services

  • Communications & PR
  • Events Management
  • Design, Branding & Printing
  • Digital Solutions
  • Transformative Storytelling
  • Marketing & Advertising

Stalk us

  • Linkedin page
  • Facebook
  • Twitter
  • Instagram
  • Youtube
  • Medium


Hotline:

+254 777665548

© 2018-2023 MediaForce Communications | All Rights Reserved
  • Privacy Policy
  • Terms of use