
Product
Announcing Socket Fix 2.0
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
⚡ Effortless M-Pesa integration using Safaricom's Daraja API — built for developers, by developers.
Integrating Safaricom's M-Pesa Daraja API directly is notoriously complex:
For many developers and startups, this becomes a huge barrier to adopting M-Pesa payments in Kenya and beyond.
mpesa-daraja-sdk
eliminates the complexity with a clean, developer-friendly Python SDK that:
Feature | Status | Description |
---|---|---|
STK Push | Ready | Lipa na M-Pesa Online payments |
C2B Payments | Ready | Customer to Business transactions |
B2C Payments | Ready | Business to Customer payouts |
Token Management | Ready | Automatic OAuth2 handling |
Account Balance | Coming Soon | Check account balances |
Transaction Reversal | Coming Soon | Reverse transactions |
🎣 Webhook Validation | Coming Soon | Secure callback handling |
Built on top of Arlus/mpesa-py with ❤️ — modernized, cleaned up, and restructured for today's developer needs.
pip install mpesa-daraja-sdk
For production deployment:
"production"
in your client initializationWe welcome contributions from the community! Here's how you can help:
# Clone the repository
git clone https://github.com/rafaeljohn9/mpesa-daraja-sdk.git
cd mpesa-daraja-sdk
# Create virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install in development mode
pip install -e ".[dev]"
# Run tests
pytest tests/
This project began as a fork of the fantastic Arlus/mpesa-py
by @Arlus.
What we've added:
Special thanks to the original contributors and the broader Python community in Kenya.
Licensed under the Apache 2.0 License — free for commercial and private use.
Made with ❤️ for the Kenyan developer community
FAQs
A Python SDK for integrating with M-Pesa APIs
We found that mpesakit demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Product
Socket Fix 2.0 brings targeted CVE remediation, smarter upgrade planning, and broader ecosystem support to help developers get to zero alerts.
Security News
Socket CEO Feross Aboukhadijeh joins Risky Business Weekly to unpack recent npm phishing attacks, their limited impact, and the risks if attackers get smarter.
Product
Socket’s new Tier 1 Reachability filters out up to 80% of irrelevant CVEs, so security teams can focus on the vulnerabilities that matter.