Payment infrastructure Kenya's developers actually deserve.
The Challenge
Safaricom's Daraja API introduces friction through inconsistent documentation, unreliable callbacks, and limited developer tooling. Integrating M-Pesa often requires rebuilding the same infrastructure for every project.
The Solution
Designed a clean abstraction layer with consistent APIs, strong TypeScript support, and a reliable webhook system. Added a production-like test mode and a billing layer, turning a difficult integration into a reusable, developer-friendly platform.
Technical Highlights
STK Push, B2C payouts, and C2B collections unified under a single consistent API.
Dynamic and static QR code generation with configurable parameters.
Webhook delivery with HMAC-SHA256 signing and exponential backoff retry logic.
Subscription billing engine with plan management and usage tracking.
Admin dashboard for transaction monitoring and system configuration.
Multi-tenant architecture with a test mode that mirrors production behavior.
Idempotency handling and full audit logging across all transactions.