Mobile money is the dominant way people pay for things across most of Africa. In Rwanda alone, MTN Mobile Money (MoMo) has over 3 million active users, and it’s the first payment method most local businesses reach for, not cards, not bank transfers.
MTN opened up their MoMo API to third-party developers a few years ago, and since then a handful of server-side wrappers have popped up (Node, PHP, Python). What was missing was a client-side SDK for React Native — something a mobile app could use directly, with proper TypeScript types and none of the boilerplate of wiring up OAuth2, sandbox provisioning, and error handling from scratch every time.
So I built one: openbank-africa-sdk.
What it does
- Handles MTN MoMo sandbox provisioning (API user + API key creation) automatically
- OAuth2 authentication with automatic token refresh
- Collections: Request to Pay, transaction status, account balance
- Disbursements: send money to users, check transfer status
- Typed errors, mapped from MTN’s own error reference (no more guessing what INTERNAL_PROCESSING_ERROR means at 2am)
- Zero runtime dependencies — works identically in a Node.js backend or a React Native app
Quick example
import { OpenBankClient } from 'openbank-africa-sdk';
const client = new OpenBankClient({
adapter: 'mtn-momo',
subscriptionKey: process.env.MTN_SUBSCRIPTION_KEY,
callbackHost: 'https://my-app.com/webhooks/momo',
environment: 'sandbox',
});
await client.authenticate();
const payment = await client.collections.requestToPay({
amount: 5000,
currency: 'RWF',
phoneNumber: '250788123456',
externalId: 'order-123',
payerMessage: 'Payment for order #123',
});
const status = await client.collections.getStatus(payment.referenceId);
Enter fullscreen mode Exit fullscreen mode
That’s it. No manual UUID generation, no manually building the Basic Auth header for token requests, no digging through the API docs to remember which header goes where.
Why “OpenBank Africa” and not just “MoMo SDK”
The architecture is built around adapters on purpose. MTN MoMo is the first one, but the goal is to eventually support Airtel Money and other providers under the same interface, so a developer building a payments feature for an app targeting multiple African markets doesn’t have to learn a different SDK for each provider.
Try it
- GitHub: https://github.com/francedermaz/openbank-africa-sdk
- npm: https://www.npmjs.com/package/openbank-africa-sdk
It’s MIT licensed, free, and open to contributions. If you’re building something with MTN MoMo, especially in Rwanda, I’d love feedback, issues, or PRs. Airtel Money support is next on the roadmap.
0 Comments
Log in to join the conversation.No comments yet. Be the first to share your thoughts.