Git Product home page Git Product logo

mpesa-mwitu's Introduction

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.