DEV Community

Cover image for Why Most Payment APIs Fail Developers Building for African Markets
Victory Lucky for Afriex

Posted on

Why Most Payment APIs Fail Developers Building for African Markets

There is a version of this problem that does not get talked about enough. A developer somewhere in Lagos, Nairobi, or Accra opens the docs for a payment API they want to integrate. The quickstart looks clean. The sandbox spins up fast. The first test transaction goes through without a hitch. Three weeks later, they are deep in the actual integration and everything starts falling apart in ways the documentation did not warn them about.

This is not a capability problem. The infrastructure exists. Africa processed over $1.1 trillion in mobile money transactions in 2024, more than any other region in the world — a figure documented in the Payment APIs and Interoperability report on Africa's financial infrastructure. The rails are real. The problem is that most payment APIs were designed for a different developer, in a different market, and then shipped to everyone else with the expectation that it would just work.

It does not just work.

The documentation was written for a developer in San Francisco

This sounds harsh but it is just accurate. Open the getting started guide for most major payment APIs and you will find examples that create charges in USD, reference Stripe's ecosystem as a benchmark, and use webhook examples that assume a stable server with a static IP. The error codes are documented for card-based payments. The currency handling assumes floating-point precision does not matter much because dollar amounts are stable.

None of that maps to what you are actually building.

If you are building something that pays a contractor in Ghana via MTN Mobile Money, or routes a disbursement to a bank account in Kenya while your business collects in dollars, you will not find a worked example for that in most API docs. You will find a generic /transfers endpoint and a note that says "contact support for regional availability." That note is doing a lot of work.

A Finance in Africa analysis of the developer API ecosystem found that some providers still require extended approval processes or manual credentials before you can even access certain regional endpoints. Chipper Cash's Head of Payments, who is quoted in the same piece, also cited sandbox reliability and inadequate developer support as persistent gaps. You cannot prototype your way through a manual approval gate. So before you have written a line of production code, you are already blocked.

FX volatility is a runtime problem, not a business problem

Every developer building for markets like Nigeria has had to think about exchange rates in a way that developers in stable currency markets never do. Between mid-2023 and late 2024, the naira went from roughly N460 to the dollar to nearly N1,740 — Bloomberg ranked it the worst-performing currency in 2024 after a 70 percent drop in one year. By early 2026 it had stabilized somewhere in the N1,350 to N1,450 range, but analysts documented businesses reporting FX losses in the hundreds of billions of naira across the cement, FMCG, and brewing sectors during the peak volatility window.

That is not a footnote. That is a core architectural constraint.

The problem is that most payment API docs treat exchange rates as a lookup, not a liability. You call a rates endpoint, you get a number, you show it to your user. What they do not tell you is what happens between the moment your user confirms the amount and the moment the transaction settles. In volatile markets, that spread can be meaningful.

Ola Oyetayo, CEO of Nigerian fintech Verto, explained in a Techpoint Africa interview on FX uncertainty that when the naira moves 5 to 10 percent in a matter of days, providers widen their spreads as a defensive move — not out of opportunism, but because they need to account for the slippage between the moment a customer initiates a transfer and the moment it actually settles in the global market. During high-volatility windows, pricing updates can happen minute by minute. If the API you integrated does not expose that to you, your users will see one number and receive another, and they will blame your product, not the underlying rails.

A payment API built for this market surfaces rate information that is honest about timing, expiry, and settlement risk. Most do not.

NITDA and the compliance layer most docs skip

Here is the part that catches international developers building for Nigerian users completely off guard.

Nigeria's data regulatory landscape is layered. NITDA has mandated since 2019 that subscriber and consumer data be hosted within Nigeria. The Nigeria Data Protection Act 2023 (NDPA), which supersedes the earlier NDPR, requires that organisations processing data for more than 200 Nigerian residents within a six-month period register as Data Controllers or Processors of Major Importance. As Banwo and Ighodalo's analysis of Nigeria's data localisation regime explains, the CBN's 2020 guidelines on electronic payment channels further require that domestic transactions be routed through a local switch.

This means the payment API you integrated, which is running on AWS us-east-1 and stores your transaction logs in a US-based database, may be putting you in technical breach of Nigerian data localisation rules the moment you launch with Nigerian users. A 2025 peer-reviewed study of Nigerian fintech software developers published in the Multidisciplinary Journal of Engineering, Technology and Sciences found that while engineers were generally aware of NDPR and GDPR concepts, the hardest part was implementing compliance in actual coding and system design — partly because of a lack of clear compliance documentation and region-specific toolkits.

That gap is where most payment API providers leave you. The technical documentation tells you how to make an API call. It does not tell you whether that call, and the data it generates, is compliant with the regulatory environment of the markets you are serving.

The fragmentation is not an accident

Africa is not one market. It is 54 countries with 178 different mobile money services, different currencies, different regulatory environments, and different payment rails. A payment that settles in seconds in Kenya via M-Pesa uses entirely different infrastructure than a bank transfer in South Africa or a mobile money disbursement in Ghana.

Chipper Cash's Adeeyo, quoted in the Finance in Africa developer ecosystem analysis, said publicly that fragmentation remains a major challenge both technically and institutionally, and that regulatory inconsistency across countries makes regional scaling harder. That is coming from someone operating in this market full-time. For a developer integrating a payment API, that fragmentation shows up as undocumented behaviour: a call that works in sandbox for one country silently returns a different response structure in production for another, error messages that are not granular enough to tell you whether a failure was a network issue, a KYC issue, or an FX liquidity issue.

Benjamin Fernandes, founder of NALA, documented this in a detailed post on why payments in emerging markets are still 1 percent built. Between May 2023 and January 2024, NALA averaged 25 payment partner issues per month. Webhook callbacks that did not fire. Incorrect reconciliation. APIs that confirmed delivery when the money had not moved. These are not edge cases. These are the operational reality of building on payment infrastructure that was not designed with African markets as the primary concern.

What a payment API built for this market actually looks like

It surfaces real-time exchange rates with honest settlement windows, not just a number. It handles mobile money, bank accounts, SWIFT, and local payment methods as first-class channels, not afterthoughts. It documents its regulatory posture explicitly — where data is stored, how transfers are handled under Nigerian or Kenyan data law, what compliance burden it takes on versus what it leaves with you.

It also designs its error responses for the failure modes that actually happen in these markets: FX liquidity gaps, KYC tier limitations, mobile network outages that interrupt but do not fail a transaction. The Afriex Business API is built around exactly these constraints. The exchange rates endpoint exposes live rates for supported currency pairs including NGN, KES, GHS, and GBP. The payment methods layer handles bank accounts, mobile money (including MTN Mobile Money), SWIFT, UPI, and Interac as fully supported channels, not beta features. The webhooks are signed, retried with exponential backoff, and documented for every transaction status that matters, including IN_REVIEW for compliance holds that are a real operational scenario in African markets.

That is what it looks like when the API was designed with this market in mind from the start, not retrofitted after the fact.

If you are building something that moves money across African borders and the payment API you are using does not talk about FX settlement windows, does not document its compliance posture for Nigerian or Kenyan data law, and does not have mobile money as a first-class channel, you are not using the wrong feature. You are using the wrong tool.

Top comments (0)