Skip to content
This repository has been archived by the owner on Oct 24, 2022. It is now read-only.
/ mpesa-mwitu Public archive

📲 A simple personal M-Pesa API gateway accesible via REST (PoC)

License

Notifications You must be signed in to change notification settings

kamikazechaser/mpesa-mwitu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Codacy Badge Telegram

📲 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 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 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 to get one.

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

About

📲 A simple personal M-Pesa API gateway accesible via REST (PoC)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published