Uncategorized

PesaPi, the open source M-Pesa API upgraded.

It was back in May 2011 that I did a blog post here about the launch of PesaPi which is an open source API for Safaricom’s M-Pesa that integrates to the web. Since then, PesaPi has become increasingly popular and my favorite geek Mike Pedersen who is behind PesaPi has been busy coding away to come up with all sorts of new enhancements. Earlier today at BarCamp Nairobi, Mike unveiled the latest edition of PesaPi which now has the following key upgrades:

  • Multiple Payment Systems – when launched in May 2011, PesaPi only supported Safaricom’s M-Pesa mobile money service. Now, PesaPi supports integration with other mobile money services such as Airtel Money, Orange Money and YU Cash, in and beyond Kenya.
  • Personal M-Pesa Accounts – when initially launched, PesaPi only supported payments going to M-Pesa business accounts where one had to register for a Paybill number with Safaricom. In the latest iteration of PesaPi, one can now use personal M-Pesa accounts to receive payments and not just business accounts. This is key since securing an M-Pesa business account can take many months and is NOT a straightforward process. In order to use a personal M-Pesa account with PesaPi, one must have a phone that runs Google’s Android with M-Pesa. At the same time, the phone needs to have SMSSync installed which is a utility that “forwards” incoming SMS messages to a computer using a data connection. This way, you can then carry around your Android phone as you normally would and whenever an M-Pesa payment notification from Safaricom comes in it can then be passed onto your website.
  • Faster Deployment – As illustrated in the YouTube video below, Mike has managed to streamline the process of integrating PesaPi into an existing web site in not more than 16 minutes from scratch!

The latest version of PesaPi can be downloaded here:

https://github.com/pluspeople/pesaPi

The video as below shows just how easy it is to deploy PesaPi version in roughly 16 minutes:

Previous post

YouTube Kenya is launched.

Next post

[Review] The wicked fast, super light and wafer thin Samsung Galaxy S2.

17 Comments

  1. Michael Pedersen
    October 15, 2011 at 10:42 am — Reply

    “Now, PesaPi supports integration with other mobile money services such as Airtel Money, Orange Money and YU Cash, in and beyond Kenya.”

    That is not completely true – PesaPi supports multiple payment systems now, and from here it is very easy to add support for the above mentioned systems (and it probably soon will) – but right at this moment PesaPi supports: Mpesa Paybill numbers, Mpesa Private numbers.

  2. October 21, 2011 at 10:09 am — Reply

    Thank you so much for this post Moses, as always very well done. Keep it up mate. 🙂

  3. November 15, 2011 at 6:38 pm — Reply

    Hi,

    good work. I am integrating PesaPi with WHMCS to automate payments for hosting.

    The big thing is… now that there is a connection between the website and the sms is it not possible to have the whole thing web based? Fields in the website for buyer’s phone number, PIN (dodgy I know), and amount. They submit the transfer request, it is sent as if from the phone itself (using the data submitted), the response returns via the sms confirmation and all proceeds as per PesaPi.

    Keep up the good work. Keep it away from Safaricom no matter what they offer. From personal experience Safaricom are not to be trusted with new ideas…

    • September 22, 2015 at 7:06 pm — Reply

      Hello, I need help with integration into WHMCS…did you manage? How did you do it?

      • June 6, 2016 at 5:21 pm — Reply

        hi. Did you manage to integrate it with whmcs ver 6.* ? if so, how did you go about it.

  4. November 22, 2011 at 12:03 pm — Reply

    Hi Moses – nice article; and want more info this. How can i get in touch?

    cheers.
    Ernest.

  5. January 23, 2012 at 1:42 pm — Reply

    hi moses,

    are there any plans from vodafone to make M-pesa more worldwide accepted anonymous payment method ?

    greetings

  6. Nicholas Gichane
    February 4, 2012 at 6:29 pm — Reply

    Hi,

    the only thing I did not understand when you use pesapi is who genreates the receipt numbers is it mpesa or my app since I want to be able to give unique codes upon successful purchase of my product.

  7. February 20, 2012 at 4:51 pm — Reply

    i was just wondering, since i don’t have an android phone, is there no other way where we can access mpesa transactions, maybe thru oauth to validate payments and provide a seamless online experience for our clients? As a developer i really wanna avoid this whole sms thing for the back end, i just wanna set up a cron job that will be updating my system automatically.
    Ok, i can see why it’s not that possible for personal numbers; but as a business cant i get oauth credentials linked to my business number and my system will be using those credentials to update my database automatically, skipping the whole sms sync thing?

    • muithi
      February 15, 2013 at 8:59 am — Reply

      Hi Ben,

      Were you able to figure out how to go about your idea? I also want to do away the SMS bit and use cron jobs on linux as well. Please give me any ideas on how you tackled this huddle.

      See below link for my Question on googlegroups for pesapi on a similar scenario to yours.
      https://groups.google.com/forum/?fromgroups#!topic/pesapi/-skote4ivmA

      • September 29, 2013 at 4:03 pm — Reply

        The answer is yes & no.

        I understand why the whole issue of dealing with SMS is clunky and why anyone would like to avoid it.
        If you have an Mpesa Paybill account then you don’t have to deal with SMS’s at all, and it works as you desire with a cron-job just fetching new transactions and informing you about them (thats not shown on the intro video).
        If however you desire to use your PERSONAL mpesa account and want to use this for receiving money then you have to deal with SMS’s – as the only way Mpesa informs a customer about movments on a personal account is through SMS.

        In other words PesaPi is subject to the constrains of what the telco’s provide of interface to your mobile money account.
        What it does is that it uses whatever interface is provided for the type of account you have and then creates a nice unified easy to integrate with interface for you to use in your application.

        I hope this clears things up, if not then please ask more questions on the PesaPi google group mailing list..

  8. zak
    May 6, 2012 at 8:30 am — Reply

    Will he add options to send bulk payments not just to receive?

  9. martin k
    January 19, 2013 at 2:42 pm — Reply

    We are looking for someone to assist us install pesapi on our website to do mpesa,yu cash and orange payments. is there someone yu would recomend

  10. January 31, 2015 at 4:10 pm — Reply

    I have paypal and other services enabled on my online store, Where can I find someone to add this to my Site… need to enable Mpesa payments

  11. August 3, 2015 at 1:42 pm — Reply

    WEll, it just does not work.

Leave a reply

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

5 × one =