Mpesa API website integration

Mpesa Integration Into Website, Guide For M-Pesa Developers To Integrate API


Mpesa, which started as sending and receiving mobile service today, has grown to help businesses get paid through Mpesa. If you own an online business, then you need to know about Mpesa integration into the website.

Integrating Mpesa into your website will make it faster for your customers to pay you easily, and transactions are safer without entering your business Mpesa till Number.

Mpesa stands out as the leading mobile money transfer in Kenya, which has revolutionized the transfer of money.

Mpesa takes away the worry to carry cash around. Today Kenyans use Mpesa more than they use their bank banks, meaning if it happens, you integrate Mpesa on your website will be a step ahead of your competitors.


The process of Mpesa integration into a website is not an easy task.

Worry not, you have come to the right place, and in this guide, there is all you need to know how to go about it.

See also: How To Unlock M-Pesa Account.

What Is M-Pesa API

Mpesa API stands for M-Pesa Application Programming Interface. This means Safaricom M-Pesa Developers can use the API to connect with users and access their services. So it means that if you have the Mpesa API, you will have access to Business to Business (B2B) as well as Consumer to Business (C2B) services.

The Mpesa C2B services allow you to use the services like the Paybill number and Till number to connect with M-Pesa users.

Also, with the Mpesa B2B, companies can make transactions with other larger companies and this is more effective via the Mpesa API for developers.

Related guide: How To Activate M-Pesa Till Number.

How To Integrate Mpesa Into Your Website

Mpesa integration into the website is a service offered by experts who know coding, JavaScript, and other related expertise.

Unfortunately, Safaricom also doesn’t offer these services to businesses that want to integrate Mpesa into their websites.

However, you don’t need to get to learn all those technical aspects of Mpesa API because there are third-party developers trustworthy to help. All required of you is to have a Paybill number.

Money is a sensitive topic, and we understand that. Here are the best third Party developers trustworthy to offer you Mpesa integration into website services.

Recommended reading: How To Register Mpesa Paybill Number.

Mpesa Integration Into WordPress Using PesaPal Payment Gateway

PesaPal is the simplest way of Mpesa integration into the website if your website is built on WordPress. PesaPal is among the leading Mpesa third-party providers, and when it comes to Mpesa Integration into a website, they are reliable and helpful.

The process of installing the plugin is simpler and faster if only you have a website built on WordPress.

The plugin is free, and you can find it on your WordPress plugins. The only drawback of using PesaPal is that you will not be receiving enough information about your website’s payments.

Here are PesaPal WordPress repository plugins you can install on your WordPress built website.

The PesaPal Pay Plugin

PesaPal Pay Plugin is the first available PesaPal you can install into your website. The plugin uses shortcodes such as PesaPal Pay, PesaPal donations to allow you to get payments through Mpesa.

The shortcodes are coded for you, but if you understand coding can understand better.

You don’t need to understand that because all you need to do is log in to your website.

Click on Dashboard, select plugins, click the search bar and enter PesaPal Plugin, then install it after that click activate.

Related article: How Does M-Pesa Paybill Work.

PesaPal Gateway For WooCommerce

It is a user-friendly Plugin developed by PesaPal. It is meant to help receive payments online through your website after you have downloaded and installed WooCommerce.

Here the process of how to install the plugin:

  1. Login into your website you wish to integrate Mpesa.
  2. Select Plugins for the integration.
  3. Click the search bar and enter the “WooCommerce Payment Gateway“.
  4. Click install.
  5. Follow the prompt to start the Mpesa integration into the website.
  6. After installing the plugin click WooCommerce Settings
  7. Click on the PesaPal icon and continue the M-Pesa integration into the website.
  8. Enter your generated PesaPal API Key and the Consumer Secret.
  9. After entering the PesaPal API key and consumer secret, you are done.
  10. You will start receiving money directly to your Mpesa Till number via the M-Pesa API.

That is how easy it is to use the Mpesa integration into the website using the PesaPal Gateway WooCommerce plugin.

The WooCommerce PesaPal Standard Payment Gateway

PesaPal offers this plugin with various options of receiving payments made through Visa Card, bank transfer, or Mpesa.

While installing this plugin, you have to select the Mpesa option and enter the PesaPal API Key and the demo consumer key.

The process of installing the plugin is as above.

Read this: How Does M-Pesa Agent Make Profit.

Mpesa Integration Into WordPress Website Using JamboPay M-Pesa Payment Gateway

JamboPay is another third party developer who can assist with Mpesa integration into the website.

However, you have to invest a minimum of Ksh 150,000 for their services. It is an ideal option for an already established website business.

The plugin’s use is not limited to only customers whose website is built by WordPress, unlike the PesaPal plugin.

To get started using JamboPay Mpesa payment gateway, visit their official website and sign up here

Recommended articles:

How useful was this post?

Click on a star to rate it!

Average rating 5 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

One Response

  1. Mary March 31, 2021

Leave a Reply

18 − 4 =