Daraja-Mpesa-Stk-Push-DjangoRest

Simple Mpesa Express Project that enables sending stk push and generating callback data.

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/

This endpoint allows viewing of callback data sent from Safaricom.

To install, follow these steps:

  • Clone the repository

  • Create a virtual environment and activate it:

python -m venv env
env/Scripts/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