This Django application demonstrates the integration of Safaricom's M-Pesa Daraja API to initiate an STK Push. STK (Sim Toolkit) Push is a feature provided by Safaricom that allows merchants to initiate M-Pesa transactions on behalf of customers.
Python (version 3.11.7) Django (version 3.2.20) Django-daraja(version 2.0)
a requirement.txt
is provided for dependancies
Installation
git clone https://github.com/denisganga/django-daraja-API.git
cd django-daraja-API
python3 -m venv myenvenv
On Linux/macOS:
source myenv/bin/activate
On Windows:
myenv/scripts/activate
pip install -r requirements.txt
setup your credentials from your developer account
python3 manage.py migrate
python3 manage.py runserver
Access the application at http://localhost:8000/index/.
Acknowledgments
Safaricom due to Django Daraja library for M-Pesa integration.