Skip to content
This repository has been archived by the owner on May 31, 2022. It is now read-only.

New M-Pesa REST APIs #12

Open
IanWambai opened this issue Aug 22, 2017 · 10 comments
Open

New M-Pesa REST APIs #12

IanWambai opened this issue Aug 22, 2017 · 10 comments
Assignees

Comments

@IanWambai
Copy link
Owner

Update Chowder to use the new Safaricom M-Pesa REST APIs. I'll try finish this by the end of the year, but it's not 100% certain. You can find more documentation here.

Here are benefits of the REST API:

  • It's uses REST and not SOAP. Android doesn't natively support SOAP, and switching to REST, means you don't need to use Chowder anymore if you're comfortable making basic API requests, which is super easy.

  • More APIs. I'm not sure, but I'll probably be able to add a few more features into Chowder. This includes B2B and B2C APIs, which should be really cool. I should also be able to add account balance checking, transaction reversals, Lipa na M-Pesa online payments (via STK push), and queries.

@IanWambai IanWambai self-assigned this Aug 22, 2017
@IanWambai
Copy link
Owner Author

IanWambai commented Sep 15, 2017

Update: Using the REST APIs is still complicated as fuck. There's definitely a need for a library to use them. The documentation isn't perfect either, I'm compiling a list of issues I'll send to Safaricom, but good thing is we can do more with the APIs than I previously thought.

@ghost
Copy link

ghost commented Nov 3, 2017

Hey, How can my android app use the MPESA C2B services now that the new APIs don't need chowder? the process, methods...etc

@IanWambai
Copy link
Owner Author

Right now you'll just have to use their REST APIs, but they've also made it such that you'll need your own server to process callbacks.

@Jkabs
Copy link

Jkabs commented Jan 1, 2018

Thanks @IanWambai

@mugash4
Copy link

mugash4 commented Feb 16, 2018

Hi IanWambai, great work. I'm an intermediate android dev, and some time back I was trying to implement mpesa system into my App, with these files from Makara a developer as well. But I wasn't able to implement them due to their nature and my level of coding understanding. So, i got stuck. Anyway, may be you can take a look at the files then expound to me a bit more what you think of them.
In the meantime, I think I'm going to make use of your implementation. since I think it's what I have been looking for. Thank you once again. Here is my email mugash4@gmail.com in case you want to get in touch.

@IanWambai
Copy link
Owner Author

Hi @mugash4. Thanks for reaching out. I wouldn't recommend using Chowder right now in the first place. It's pretty old code now and Safaricom has new APIs. I've been too lazy/busy to update it but I probably will over the next few months. If your objective is to process M-Pesa payments I recommend this. They have a great STK push API.

@mugash4
Copy link

mugash4 commented Feb 16, 2018

Thanks, @IanWambai for your feedback. I'm looking for really simple implementation like yours. coz I'm still learning and there's a lot I don't know regarding such payment implementation. I hope you understand where I'm coming from.
Hey did you check the files I send you in my earlier post? what do you think of them? Thank you

@IanWambai
Copy link
Owner Author

@mugash4 well if you're looking for something simple, I think the link I sent you is a pretty easy way to add M-Pesa to your project. It looks like the code you're working with still uses SOAP/Chowder, which I wouldn't recommend. If you know how to make API calls on Android, which you can easily learn, then you should be good to go. All you'll need is an iPay account.

@mugash4
Copy link

mugash4 commented Feb 16, 2018

@IanWambai Thanks for the honest response. I will try and if it gets hard I will have to wait for your update

@habeebrahmanpt
Copy link

habeebrahmanpt commented Apr 10, 2018

Hey, How can my android app use the MPESA C2B services using new RestApi the process, methods...
https://sandbox.safaricom.co.ke/mpesa/c2b/v1/simulate

https://sandbox.safaricom.co.ke/mpesa/c2b/v1/registerurl
and what is use of callback url ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants