• Home
  • About
    • Overview
    • Our Clients
    • Join our team
  • What we do
    • Communications & PR
    • Marketing & Advertising
    • Design, branding & printing
    • Events Management
    • Digital Solutions
    • Film and Video Production
    • Professional Photography
  • Our Work
  • Our Blog
  • Contacts
  • Request a Quote
  • Privacy Policy
  • Terms of use
✕
            No results See all results
            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
            98
            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

            4 Comments

            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
              • Anselm Muchura says:
                January 6, 2023 at 11:38 AM

                Hi Fabian, kindly used the updated plugin in the plugin link

                Reply
            2. Lu says:
              September 20, 2023 at 6:52 PM

              This doesn’t work.

              Reply
              • Anselm Muchura says:
                September 26, 2023 at 11:37 AM

                Hi Lucy, we have updated the link to the mpesa plugin.

                Reply

            Leave a Reply Cancel reply

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

            More Blog

            • Film & Video Production services where creativity, storytelling, and cinematography come together0
              Where creativity, storytelling, and cinematography come together – Film & Video Production
              July 25, 2023
            • 0
              WRC Safari Rally Corporate and Brand Partnership Opportunities
              June 21, 2023
            • 8 Easy Ways to Get Your Website Found on Google0
              8 Easy Ways to Get Your Website Found on Google
              June 12, 2023
            • 0
              8 Key Steps for Successful International Conference Event Planning
              May 16, 2023
            • What to Consider When Choosing A Web Hosting provider in Kenya0
              7 Factors to consider when choosing a web hosting company in Kenya
              April 4, 2023
            • Why regular website audits are important for your online presence0
              Why regular website audits are important for your online presence
              March 24, 2023
            • 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

            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 740 977 977

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