- This is sample code showing how to make requests to the Safaricom B2C/B2B Mpesa API.
- The code is provided mainly for documentation purposes and to server as inspiration(or not) for your own code.
- Please note, that the code may not work as is.
- Also note that these code may be stale. As a point of note, Safaricom has since the publication of this repo come out with what I hear is a better API than what the previous one(which this code sample was based on).
- Find the newer safaricom Mpesa API's at: https://developer.safaricom.co.ke/apis
pip install requests pycrypto ndg-httpsclient pyasn1 pyOpenSSL httplib2
look at the code_example.py file for insipiration (or not)