How to make money blogging in Kenya

Mpesa Integration to Website: Learn How to Add Mpesa API to Your Site

I finally started accepting Mpesa Payments via my website! You can now pay for your favorite e-course or a web design project straight from this website. That is what I call a milestone

However, the journey to this point has not been an easy one. The difficulties I faced trying to integrate an Mpesa Payment Gateway on my website left me wondering why we do not have more developers investing in this area. At the least, Safaricom should come up with solutions on this but they seem to have left it to third-party developers.

JamboPay Mpesa Payment Gateway

One of the most popular online Mpesa Payment Gateways. Their downsides is that they charge an arm and a leg to have you use their Mpesa payment gateway. When I enquired about their services, they slapped me with a quotation that almost toppled me over.

Here is a screenshot of the email I received from them

How to Accept Mpesa on your website

To use JamboPay Mpesa gateway, you would need to pay at least Ksh 150,000 for them to setup your account. Clearly, JamboPay’s service are not for the small online trader or a struggling startup. I told them that much and headed back to Google to find a more viable solution.

PesaPal Payment Gateway

If you can forgive them for the lack of information/misinformation on their website, PesaPal are the guys to use for your online Mpesa Payments.

If your eCommerce store is built on WordPress, integrating with the PesaPal Mpesa Payment gateway is quite easy. There are several plugins available for free on the WordPress repository that make it very easy to start accepting Mpesa on your website.

  1. PesaPal Pay

Last updated on November 2014, the PesaPal Pay WordPress Plugins lets you collect payments via all the mobile money transfer services in Kenya. It makes use of forms and shortcodes [pesapal_pay] and [pesapal_donations] to collect payments and donations respectively.

The plugin is not very intuitive to use. Unless you know your way around coding, I would advise you try the other alternative provided below.

2.  WooCommerce PesaPal  Standard Payment Gateway

Last updated in July 2014 and downloaded 330 times, the WooCommerce PesaPal Standard Payment Gateway extends WooCommerce’s functionality and lets you charge for goods via Mpesa and other mobile payment services in Kenya.

I could not get this plugin to work on my website, and I finally gave up trying to use it.

I am not sure why the developer insists that you use demo consumer key and api during installation…

  3.  PesaPal Gateway for WooCommerce

This is the WordPress plugin that I ended up using on my online stores. It is super easy to use when you have WooCommerce installed on your WordPress website.

  • Simply download the plugin from the WordPress repository
  • Unzip it and upload it via FTP to wp-c0ntents/plugins.
  • Activate on your WordPress Dashboard
  • Go to WooCommerce Settings and Click on PesaPal
  • Enter your PesaPal API Key and Consumer Secret and start accepting payments via Mpesa!

I actually tried it with a sample product that I created on my website, and it works like a charm!

Lipa na Mpesa Online

Safaricom actually have an online Payment Gateway where you can Lipa na Mpesa. This came as a surprise to me. However, I cannot understand why I have to call or email them in order for them to share the details of the application with me.

Lipa na Mpesa OnlineThose are the 3 online Mpesa payment gateways that I am currently aware of. PesaPal takes the trophy home. It is super easy to register for a Merchant account on their website and the available free plugins makes it a darling to work with.

With the PesaPal Payment Gateway, there is no reason why you should not be selling your goods online. Contact me today to set up a beautiful online shop for your business.

51 thoughts on “Mpesa Integration to Website: Learn How to Add Mpesa API to Your Site”

  1. HELLO my name is benjamin, am working on the same project and i need your help.
    i have already signed up with pesapal buh the problem i have is integrating it with my website (www.forwardit-charity.org)
    all i need is a donation form but through pesapal. Can anyone help me with the code.

    Reply
  2. Dear Patrick Mahinge,

    Thanks for your interesting blog. I was wondering, do you need a Lipa Na M-Pesa number to use these service and go through the required process with KRA Pin, Business License, or is there a way to circumvent this process? Looking forward to hear from you.

    Kind regards, Tim Dost

    Reply
  3. Hi Patrick,

    This is nice post on integrating Mpesa payments on websites.

    However, for those looking for ways to custom integrate Mpesa to their custom websites, the integration on Safaricom website is not very clear.

    This has already been solved by easy plug and play solutions offered at https://www.paymentprocessor-script.com

    Just follow it and see what you can come up with.

    Reply
  4. HI I need help with integrating mpesa payments on my woocommerce website.
    Any competent developer from kenya please help

    Reply
    • Are you a developer? Or just looking for someone to integrate. I could be of help in integrating Mpesa payments. Please call me on: +254706745202.

      Reply
      • Hello Brian,
        I have a freelancing site, I want to integrate instant Mpesa Online deposit and withdrawal, to work exactly the way it works for BETIN.CO.KE

        Clients should be able to instantly load cash via Mpesa to their account and should also be able to withdraw cash to Mpesa instantly.

        Are you able to do this kind of integration for me?

        [email protected]
        Mobile: 0721519271

        Reply
  5. Thank you Patrick Kihara for such an informative post. Francis Ndungu, your guide is also very good. I salute you kind gentlemen, and all those contributing to the replies for taking your time to add insight to the pool of knowledge. I will save a lot of money doing this myself. I would also like to copy something akin to what betting sites have, where when a customer pays money into my paybill, or till, it shows the balance on the website, almost instantaneously. They can then let the money lie there, or make a purchase with that balance. Any guide on doing that? Bravo folks

    Reply
  6. hello guyz av tried my best but iget this error
    requestId “25797-1030804-1”
    errorCode “400.003.02”
    errorMessage “Bad Request – Invalid ValidationURL”
    what coulbe the problem am using php and xammp as my server

    Reply
  7. Hey guys, I am using Angular with Firebase (no PHP stuff), and I’m having a difficult time integrating mpesa to my site. Anyone managed to do it

    Reply
  8. May i get someone to help me go through all this process and integrate Mpesa to my woocommerce site?
    My name is OLIVER CHANYA and my phone number is 0720083869
    Offcourse for a fee.

    Reply
  9. I have noticed you don’t monetize patrickmahinge.com, don’t waste your traffic, you can earn extra bucks every month with new monetization method.
    This is the best adsense alternative for any type of website (they approve all websites), for more
    info simply search in gooogle: murgrabia’s tools

    Reply
  10. Set of Official Soccer Bookies
    Actively playing soccer gambling is no longer only
    a fun exercise that is done in extra time. Unlike before any time gambling
    was underestimated, right now online gambling games previously have
    a very good and pretty seen elite. Now, several men and women are pursuing careers
    in the world associated with gambling online and not a few of them acquire an abundant profit from this game.

    Therefore you don’t need to be reluctant to play internet gambling, the particular set of official soccer betting shops that we can suggest is Depobola, now typically
    the time you require is determination and the right strategy to be able
    to beat each game so you can take a lot of advantages from
    numerous types of gambling of which you play. But may gambling that relies on luck really benefit?

    Typically the answer is yes! Even though gambling
    is known in the neighborhood is synonymous with luck, but actually there are usually many steps you can take to enhance your chances of successful in online gambling online
    games, especially on the kind of betting betting.

    In this article we will discuss some tips that can be used to win in soccer gambling games.

    Easy Suggestions to Win Ball Gambling
    Sports gambling can not end up being separated from luck,
    yet that does not suggest you only have in order to rely on one of these brilliant factors due to the
    fact there are still several things you can do to be able to increase
    the probability of you winning the ball betting sport.

    On this occasion we are going to discuss some surefire tips on winning the official Bola tangkas soccer gambling game.
    Although the following tips cannot guarantee 100% that you will win in every bet, the tips
    all of us will give you happen to be tested and proven by simply professional players to increase your chances of
    winning by 90%!
    – Don’t be too tempted by Odd
    For those of you who have always been in the particular world of
    betting, definitely know what is meant by odd.
    This is actually the term used for the value placed
    by certain bets amongst people. This Odd will later on be multiplied by
    the amount of bets that the player plays and may be the amount of the
    winnings obtained.
    Each bet includes a different odd, there are small , likewise large.
    Even though a big odd means to help to make a major profit but
    you also have to be aware because on many occasions a big odd signifies that typically
    the guess has a little opportunity to occur or the opportunity of winning is extremely small
    so you too tempted by the strange.
    – Know the Clubs to Compete
    These are the most crucial tips! Pay focus and identify the clubs
    that will compete, unless you recognize the two teams that
    may compete in a match you ought not place a guess because it is
    synonymous with suicide.
    There are many platforms of which you can use to
    identify the team that may compete. Make a
    complete observation, if necessary make use of the match prediction service to provide a better picture to determine wagering.

    – Make use of a Good Financial Strategy
    Whatever happens, all of us advise you play together with a tiny budget.
    Maybe typically the money you get coming from winning will
    also be small but when your bet loses, you will also only lose a little portion of the main city
    you have. The more wagers you play the far better because it means you have more chances regarding winning.

    – Enjoy typically the Excitement of Playing on Depobola
    For anyone who need to play at the Sbobet bookie,
    register yourself now at the official Sbobet bookie agent in Depobola.
    By becoming a member on Depobola, you can certainly access all of the video games provided by Sbobet’s bookie.
    Registration is also very easy and doesn’t consider much time.

    By turning into a member of typically the Depobola gambling dealer, a person will get a variety of benefits such because bonuses and promos that will are abundant.

    The repayment method is also very complete, not merely transfers
    through local banks, you may also use services these kinds of as OVO,
    Dana, GoPay, and Link to help to make financial transactions
    such as deposits or withdrawals.
    Registration is additionally very easy, does not require a bank card
    or perhaps a large budget to try out. Only with an ID cards, telephone number and energetic
    current email address can you very easily become
    an official member of Depobola.

    Reply
  11. Admiring the commitment you put into your website and detailed information you present.
    It’s nice to come across a blog every once in a while that isn’t the
    same unwanted rehashed information. Fantastic
    read! I’ve saved your site and I’m including your RSS feeds to my Google
    account.

    Reply
  12. Perform Sbobet Casino Live Betting

    Are you a enthusiast of online casino gambling? If so, of program you are extremely familiar with Sbobet online gambling internet sites.
    Yes, Sbobet is the particular most significant and
    most reliable online gambling site of which operates in Asia, The european countries and beyond.

    So significantly, countless players have became a member of as
    members on Sbobet and thousands of participants linked
    every single day to enjoy the best quality on the
    internet gambling games provided simply by this site.

    No wonder Sbobet has been named the best online gambling
    user in Asia for 2 many years in a row. This website also bears the
    subject among the most influential businesses
    based on the world caliber evaluation magazine. That is, Sbobet’s reputation being a provider regarding online casino gambling providers is no doubt.
    Almost all games provided by Sbobet casino online
    are sure to meet or go beyond your expectations.

    Choice of the Most Popular Sbobet Casino Game Types
    About Sbobet, there are many types of internet gambling online
    games that you can enjoy. Not merely an ordinary
    online casino game because on Sbobet you can also play
    it live or survive! Yes, through the Sbobet casino live feature,
    an individual can feel how to play online gambling, but with the sensation of enjoying actual money bets in a luxury gambling house such as Las Vegas or Macau.

    With Sbobet casino reside you can interact along with other players directly, and you will also chat with gorgeous and
    sexy dealers that will accompany you through
    the game. So bid farewell to a lonely and uninteresting game because with Sbobet,
    you will play online casino in a higher level.

    Sbobet casino gambling game collection is very complete, an individual can enjoy various types of the most
    exciting on line casino games, including:

    Roulette
    This particular is a live casino gambling game that is usually arguably one of the most widely recognized by the public and most identical to the casino.
    Played with a media basketball and also a spinning wheel, the uniqueness
    of this sport is that you is going to be presented with a
    variety of betting options.
    Every game offered has its chances and the amount regarding
    pay is different, so it is very crucial that
    you can have a specific strategy in choosing gambling
    bets to be played.
    Black jack
    One of the reside casino gambling that will be very popular
    with bettors in the world. Black jack has simple rules but it does not disentangle the
    excitement of this game. Unlike other gambles that depend on luck, Blackjack can definitely be won together with mature strategies such as card counting.

    Baccarat
    Despite the fact that similar to Blackjack, within the Baccarat game you don’t need
    to play against the town. Here you only have got to choose one from
    the three available bet varieties. Your goal is to choose which card group has the highest value.

    Sic Bo
    Played since more than 3000 many years ago, Dadu is one of the oldest wagering dice games that is usually still
    played today. Just about all you need to do is guess appropriately
    typically the results of the three dice shuffle through the
    particular available betting options.
    Just how to Register Sbobet Online casino on Depobola
    For those of you who else want to immediately sign up and join the Sbobet
    casino gambling game, the way is incredibly easy. An individual only need to sign up as a member on Depobola.

    Look at the site plus then enter the enrollment menu, for more ease, bad ankle injury.

    Fill in the registration form with your own personal
    identity completely in addition to properly and make certain all the fields are usually
    filled in. After that, complete the registration method by
    typing the confirmation code, then pressing the “Register Now” button. Hold out a couple of occasions and a person will get confirmation coming from Depobola to
    activate your own account.

    To play, you must first make a down payment. Contact Depobola customer support through the live chat
    feature available on the site in order to get further
    assistance with Deposits. After making a deposit, you can immediately pick the Sbobet casino gambling game that you want.

    Reply
  13. Hey there! I could have sworn I’ve been to this website before
    but after checking through some of the post I realized it’s new to me.
    Anyhow, I’m definitely delighted I found it and I’ll be book-marking and checking back often!

    Reply
  14. Nice post. I was checking continuously this weblog and I’m impressed!
    Very useful information specifically the last part 🙂 I deal with such info much.
    I used to be looking for this certain information for a long time.
    Thank you and best of luck.

    Reply
  15. Hi, i read your blog occasionally and i own a similar one and i was just wondering
    if you get a lot of spam comments? If so how do you reduce it, any plugin or anything you can recommend?
    I get so much lately it’s driving me mad so any assistance is very much appreciated.

    Reply

Leave a Comment