Message us on WhatsAppCall 0742 020 610

Going live on the MTN MoMo API in Uganda: what it takes

Getting a payment prompt onto a test phone with the MTN MoMo API takes an afternoon. Getting the same thing live, with real money, for a business whose finance team has to sign off the books at month end, takes longer, and almost none of the extra time is code. This is the whole path, including the parts the tutorials leave out.

What the API does

MTN sells the MoMo API as products. The two most businesses need are Collections, where your system asks a customer to pay and the customer approves on their phone, and Disbursements, where your system sends money from your account to a customer, agent or supplier wallet. A school collecting fees, a clinic taking a bill, a SACCO paying out a loan: each is one or both of these.

The flow for a payment is short. Your system sends a request to pay with the amount, the customer's number and your own reference. The customer's phone shows a prompt. They enter their PIN, or they ignore it. MTN tells you the result.

Step 1: the sandbox

MTN's developer portal gives anyone a sandbox: you sign up, subscribe to Collections or Disbursements, and create your own test user and key. Everything is simulated, nobody's money moves, and you can build the whole integration here, including the failures. Do not skip the failures. They are what the next three steps are about.

Step 2: the account in your name

Production access is not something a developer switches on. MTN issues live credentials to a registered business after a Know Your Customer review, and only after that review is approved. Expect to provide your company registration documents, the details of the directors, the account the money settles into, and a description of what you are collecting money for. MTN's own page says the API is open to anyone who complies with its terms, KYC and anti-money-laundering rules among them.

Two things follow, and both matter more than they look. First, the application must be in your organisation's name, not your developer's. If an agency applies for you, the merchant relationship and the credentials sit with the agency, and so, in practice, does the money's path. When we do this work we prepare the application with you and you submit it; the credentials and the account stay yours if you ever change supplier. Second, the review takes the time it takes. Plan the launch date around MTN's approval, not around the code being finished.

Step 3: the payments that do not complete normally

Here is the part that separates a demo from a system finance can rely on. A request to pay stays pending until the customer approves it, declines it, or it times out. When it reaches a final state, MTN sends a notification to the address you registered, called a callback. MTN's documentation is plain about the catch: the callback is sent once, and it is not retried.

So consider the cases a live system will meet in its first week:

  • The callback never arrives. Your server was restarting, or the network blinked. The customer has paid, your system still says pending, and the customer is at the counter holding a confirmation SMS.
  • The customer pays twice. They did not see the first prompt, tapped "pay" again, and approved both.
  • The request times out after the customer approved. Their phone was slow, the confirmation came late, and somebody marked the bill unpaid.
  • A staff member retries a failed payout that had in fact gone through.

The answer is the same discipline every time. Each request carries a unique reference of your own, stored before the request leaves your system. Anything still pending after a set time is checked with MTN directly, so nothing is marked failed while the money has already moved. A payout is never retried without first asking MTN what happened to the last one. And the record in your system changes once, from the first final answer, whichever way it arrives.

Step 4: reconciliation

Finance does not trust a dashboard; it trusts a statement. Every day, the payments your system recorded should be matched against MTN's statement for your account, with every difference listed: paid in MTN but not in your records, recorded by you but not by MTN, or the right payment against the wrong invoice. On a good day the list is empty. On a bad day it is short, and it is the first thing someone reads.

Step 5: go-live and after

Switching to production changes the address you call, the credentials, and the environment name, and from that moment the prompts are real and so is the money. Start with a small number of real transactions you can watch, then open it to everyone. After launch, log every request and answer, alert someone when failures rise, and expect MTN to change the API now and then.

What it costs

MTN charges transaction fees on live payments; they are set in your agreement with MTN, not published, so ask for them in writing during onboarding and put them into your prices before launch. The build is the other cost, and most of it is the status checks and reconciliation above rather than the payment call itself. Get it quoted as a fixed price against a written scope, and run the build alongside MTN's review rather than after it.

Direct, or through an aggregator?

Everything above assumes you connect to MTN directly. A payment aggregator such as Flutterwave gives you MTN and Airtel through one integration and handles the onboarding for you, in exchange for a percentage of every payment. Which is right depends mostly on your volume, and we have written the comparison up separately: Flutterwave or the MoMo API directly?

If you are planning MoMo payments in your own system, see how we build the MTN MoMo integration, or book a 30-minute call with an engineer.

New articles by email

We send them when they are published. Ask us any time to take you off the list. We use your email for nothing else.