Simple Mpesa Express Project that enables sending stk push and generating callback data, processing payment of a specific order and checking if transactions where complete or not.
Available endpoints:
/stk/
This endpoint allows sending stk push to the provided phone number. The required data for this POST request is phone number and amount.
/callback/order_id/
This endpoint allows viewing of callback data sent from Safaricom.
-
Clone the repository
-
Create a virtual environment and activate it:
python -m venv env
env/bin/activate
- Install the required packages:
pip install -r requirements.txt
- Set up the database:
python manage.py migrate
- Run the server:
python manage.py runserver