MoMo, minus the edge cases.
settle is a developer toolkit for accepting MTN MoMo payments in your own code. It solves the hardest integration problems once, so you don't have to debug them across every new project.
What the API leaves out
Integrating MTN MoMo seems simple on paper. The API surface is small. The real complexity lies in everything it leaves undefined.
A request times out, leaving you unsure if the customer was charged. Webhook notifications arrive unsigned, vulnerable to spoofing. API errors return empty payloads or 200 OK responses with error HTML inside.
Even small syntax details cause silent failures—like an unescaped apostrophe blocking a transaction for a customer named Jean d'Amour.
Handled at the boundary
settle handles these edge cases at the library boundary.
Idempotent retries ensure customers are never double-charged. Inbound webhook callbacks are re-verified with MTN before your application ever sees them. Unclear error codes are translated into actionable diagnostics.
It supports all twelve countries where MoMo operates, configuring regional gateways automatically. It also ships with a local mock server for offline testing—critical when the official sandbox is unreachable.
Open infrastructure
The frustrating part of payment APIs isn't just the edge cases; it's that every engineering team has to rediscover and solve them in isolation.
settle exists as shared infrastructure. If you find a new quirk or a better solution, the project is open for contributions.
Disclaimer
settle is independent and open source. It is not affiliated with MTN, and it never touches funds directly: all transactions execute against your own merchant account.