This project demonstrates how to integrate the M-Pesa API into Python applications for seamless mobile payment processing. M-Pesa is a mobile money service offered by Safaricom in Kenya, allowing users to transfer money, pay bills, and more, directly from their mobile phones.
The M-Pesa API provides developers with various endpoints for initiating transactions, querying transaction status, and managing accounts. This project focuses on leveraging the M-Pesa Daraja API, which offers a straightforward and secure way to integrate M-Pesa functionality into Python applications.
- Generate access tokens for authentication
- Initiate payment requests (STK push)
- Receive and handle transaction callbacks
- Query transaction status
- Manage account balances and statements
To get started with this project, clone the repository and follow the setup instructions provided in the documentation. Ensure you have the necessary credentials from Safaricom Developer Portal to authenticate API requests.
- Python 3.x
- Requests library
- Flask framework (optional for building web applications)
- M-Pesa Developer Account
# Example usage of M-Pesa API integration
# Insert code snippets and usage instructions here
Contributions are welcome! If you have any ideas for improvements or new features, please open an issue or submit a pull request.
This project is licensed under the MIT License.
Feel free to customize the introduction to match the specifics of your project and provide any additional information or instructions as needed.