Which format does each payment API want?
| API | Field | Format | Uganda example |
|---|---|---|---|
| MTN MoMo | payer.partyId | Country code + number, no "+" | 256772123456 |
| Airtel Money (direct API) | subscriber.msisdn | Number without the country code | 752123456 |
| M-Pesa Daraja (Kenya) | PhoneNumber, PartyA | 254 + 9-digit number | — |
| Paystack mobile money | mobile_money.phone | Local format with leading 0 | — |
| SMS APIs, databases | — | E.164: "+", country code, number | +256772123456 |
Store numbers in E.164 (+256772123456) and convert at the moment you call each API. E.164 is unambiguous, sorts and deduplicates cleanly, and converts to every other format without guessing the country.
The leading-zero trap
In most of East Africa and Nigeria, the 0 at the start of a local number is a trunk prefix: you dial it at home but drop it after the country code.0772 123 456 becomes 256772123456.
In Côte d'Ivoire, Benin and Congo the 0 is part of the number itself. Côte d'Ivoire moved to 10-digit numbers in 2021, so07 01 23 45 67 becomes 2250701234567. Code that always strips a leading 0 breaks every one of these numbers. This formatter knows which countries keep it.
Supported countries
| Country | Code | Digits | Example → MoMo format | Networks with mobile money |
|---|---|---|---|---|
| Uganda | +256 | 9 (after 0) | 0712345678 → 256712345678 | Airtel (Airtel Money), MTN (MTN MoMo) |
| Kenya | +254 | 9 (after 0) | 0712123456 → 254712123456 | Airtel (Airtel Money), Safaricom (M-Pesa) |
| Ghana | +233 | 9 (after 0) | 0231234567 → 233231234567 | Telecel (Telecel Cash), at (AT Money), MTN (MTN MoMo) |
| Rwanda | +250 | 9 (after 0) | 0720123456 → 250720123456 | Airtel (Airtel Money), MTN (MTN MoMo) |
| Tanzania | +255 | 9 (after 0) | 0621234567 → 255621234567 | Airtel (Airtel Money), Yas (Mixx by Yas), Vodacom (M-Pesa) |
| Zambia | +260 | 9 (after 0) | 0955123456 → 260955123456 | MTN (MTN MoMo), Airtel (Airtel Money) |
| Nigeria | +234 | 10 (after 0) | 08021234567 → 2348021234567 | Airtel (Airtel Money), MTN (MTN MoMo) |
| Cameroon | +237 | 9 | 671234567 → 237671234567 | Orange (Orange Money), MTN Cameroon (MTN MoMo) |
| Côte d'Ivoire | +225 | 10 | 0123456789 → 2250123456789 | Moov (Moov Money), MTN (MTN MoMo), Orange (Orange Money) |
| Benin | +229 | 10 | 0195123456 → 2290195123456 | MTN (MTN MoMo), Moov (Moov Money) |
| Congo (Brazzaville) | +242 | 9 | 061234567 → 242061234567 | Airtel (Airtel Money), MTN (MTN MoMo) |
| Liberia | +231 | 7 or 9 (after 0) | 0770123456 → 231770123456 | Lonestar Cell (MTN MoMo), Orange (Orange Money) |
Network detection and number portability
The network is worked out from the number's first digits, using the operator prefix ranges. This catches the most common integration bug: sending an Airtel number to MTN MoMo, which fails with PAYER_NOT_FOUND.
Several countries let customers keep their number when they switch networks, so a prefix can point at the wrong operator. Use the detected network to warn, pre-select or suggest, but let the customer choose their wallet.
Frequently asked questions
What is an MSISDN?
MSISDN is the telecom name for a mobile phone number in international format: the country code followed by the subscriber number, with no plus sign, spaces or leading zero. For example, the Ugandan number 0772 123 456 is the MSISDN 256772123456.
What phone number format does the MTN MoMo API expect?
MTN MoMo expects the payer's partyId as the country code plus the number, digits only, with no "+" and no leading 0, for example 256772123456 in Uganda or 233241234567 in Ghana. In Côte d'Ivoire, Benin and Congo the 0 is part of the number, so it stays: 2250701234567.
What format does M-Pesa Daraja STK push expect?
Daraja expects Kenyan Safaricom numbers as 254 followed by the 9-digit number, for example 254712345678, for both PhoneNumber and PartyA. Don't include "+" or the leading 0.
Can I tell the network from the phone number?
Usually, from the first digits. But Kenya, Ghana, Nigeria and other countries allow number portability, so a customer can keep their number when they switch networks. Treat the detected network as a hint, not proof, and let customers pick their wallet.
What format does Flutterwave expect for mobile money?
Flutterwave's own examples are inconsistent: some show the local format and some include the country code. Test with your Flutterwave account, and keep the E.164 version stored so you can produce either.
Related
- MTN MoMo Request Builder: generate Request to Pay code with the number in the right format.
- Airtel Money Request Builder: converts numbers to Airtel's format automatically.
- MoMo Callback Validator: explains PAYER_NOT_FOUND and other failure reasons.
- MoMo integration guides for Node.js, Laravel and Django, each with a tested phone-number helper.
- Flutterwave mobile money in Uganda (Node.js): MTN and Airtel through one integration, with verified webhooks.
Number ranges and operator prefixes come from Google's libphonenumber(Apache License 2.0), updated 2026-10-28. API formats checked October 2026.