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:
17 Comments
“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.
Thank you so much for this post Moses, as always very well done. Keep it up mate. 🙂
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…
Hello, I need help with integration into WHMCS…did you manage? How did you do it?
hi. Did you manage to integrate it with whmcs ver 6.* ? if so, how did you go about it.
Hi Moses – nice article; and want more info this. How can i get in touch?
cheers.
Ernest.
@ernie get a hold of Mike Pedersen who developed PesaPi. He can be reached on http://www.uhasibu.co.ke
hi moses,
are there any plans from vodafone to make M-pesa more worldwide accepted anonymous payment method ?
greetings
@macbroadcast I have no idea
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.
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?
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
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..
Will he add options to send bulk payments not just to receive?
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
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
WEll, it just does not work.