MTN Mobile Money
Collect a payment the caller approves on their handset, with the sandbox keys to try it and the live ones to run it.
MTN Mobile Money
Collections through MTN's MoMo Open API. The caller approves the payment on
their own handset, so a collection is asked for and then checked; the
momo_collect template shows the whole conversation.
Sandbox
- Sign up at https://momodeveloper.mtn.com and subscribe to Collections.
The primary key of that subscription is thesubscription_keysecret. - Create an API user:
POST /v1_0/apiuserwith a fresh UUID as
X-Reference-Idand{ "providerCallbackHost": "luftflow.com" }. That
UUID is theapi_usersecret. - Create its key:
POST /v1_0/apiuser/{api_user}/apikey. TheapiKeyin
the answer is theapi_keysecret.
The sandbox takes EUR, its target environment is sandbox, and every number
but MTN's documented test numbers is approved at once.
Live
MTN issues production keys per country once the business is onboarded. The
host is https://proxy.momoapi.mtn.com, the target environment names the
operating company (mtnzambia, mtnuganda), and the currency is the
country's own. Each secret is the live subscription's, never the sandbox's.
Outcomes
- Collect a payment answers
202once the prompt is on the handset,409
when this session already asked, and4xx/5xxwhen MTN refuses. - Check a payment reads
SUCCESSFUL,PENDINGorFAILED; MTN's own
statusfield sits underbody, sincestatusat the top is the HTTP
status.