https://github.com/kamikazechaser/mpesa-mwitu
📲 A simple personal M-Pesa API gateway accesible via REST (PoC)
https://github.com/kamikazechaser/mpesa-mwitu
mpesa mpesa-api mpesa-rest
Last synced: 4 months ago
JSON representation
📲 A simple personal M-Pesa API gateway accesible via REST (PoC)
- Host: GitHub
- URL: https://github.com/kamikazechaser/mpesa-mwitu
- Owner: kamikazechaser
- License: agpl-3.0
- Archived: true
- Created: 2017-03-29T10:47:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2017-06-19T13:20:50.000Z (over 8 years ago)
- Last Synced: 2025-04-29T23:36:31.311Z (6 months ago)
- Topics: mpesa, mpesa-api, mpesa-rest
- Language: JavaScript
- Homepage:
- Size: 43.9 KB
- Stars: 9
- Watchers: 4
- Forks: 6
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- jimsghstars - kamikazechaser/mpesa-mwitu - 📲 A simple personal M-Pesa API gateway accesible via REST (PoC) (JavaScript)
README
[](https://www.codacy.com/app/kamikazechaser/mpesa-mwitu?utm_source=github.com&utm_medium=referral&utm_content=kamikazechaser/mpesa-mwitu&utm_campaign=badger)
[](https://telegram.me/kamikazechaser)
> 📲 M-Pesa Mwitu
A simple personal M-Pesa API gateway accesible via REST
## About
This project allows you to proccess payments receieved on your personal M-Pesa account via REST. It is heavily inspired by PesaPI.
**Important Information**
- You will need the [smsSync app](https://play.google.com/store/apps/details?id=org.addhen.smssync) installed on your Android phone.
- This project will need to be deployed independently.
- This project uses MongoDB as its primary (and only) database.
**REST API Information**
Every request returns:
- Actual server status codes
- An "ok" status
- A short message
- Payload (if available).
## Configuration
Prior to running the server, you need to populate the [configuration](https://github.com/kamikazechaser/mpesa-mwitu/blob/master/config.dist.js) file.
smsSync configuration
- URL should point to the base URL i.e https://your.domain/
- Secret should be the same you enter in the config file above
- HTTP method should be POST
- Data format should be JSON
## Easy Deployment
You can easily deploy a instance of M-Pesa Mwitu on Heroku. Simply click on the button below.
If you need a MongoDB instance, head over [here](https://mlab.com) to get one.
[](https://heroku.com/deploy)
## API Reference
GET /api/transactions/receipt/:receipt
> Get a transaction by receipt
GET /api/transactions/phone/:phone
> Get all transactions linked to a specific phone number
GET /api/transactions/validate/:receipt
> Validate the "used" field. Useful in cases such as online shops and digital goods
## Issues And Contribution
Fork the repository and submit a pull request for whatever change you want to be added to this project. If you have any questions, just open an issue.
## License
Released under AGPL-3.0