All productsDeveloper documentation
MoMo API Gateway
MTN MoMo is mobile payment system which is available in Uganda, Ghana, Zambia, Cameroon, Swaziland, Ivory Coast, Benin, Guinea-Conakry, Rwanda, Congo Brazza, Liberia and South Africa.
MTN MoMo has an API for the developers to create Apps for merchants to received payments, API documentation is available online on https://momodeveloper.mtn.com.
After doing developer support on MoMo Skype Forums we have noticed that people often have troubles getting the API to work in the Sandbox and Live environments. Often, it increases the time to market for the eCommerce Apps and Websites.
**In order to make the life of developers easier and shorted the time to market for Apps we decided to develop MoMo API Gateway SAAS platform. **
Here are the features of the MoMo API gateway:
- One API call to request a payment over MoMo
- Request payments in all 12** MoMo countries **
- Support for Status Callback function which always works!
- Status Callback works even in the Sandbox environment
- Error reporting by Email - Active developer support, we are always online and do help!
- Swiss security and data protection standards
- Stability and reliability of ISO 27001 certified hosting, more www.nine.ch
- On-request support for other payment providers Orange Money & Airtel Money
Request payment over MoMo
Request money from any MoMo account. Just a few parameters needed:
- Amount as a number, for now integer numbers only, no floating point
- Payment note, text only, no Emails, links or colons please
- Payer mobile number, international format, no “+” in front!
curl --location --request POST 'https://momopay.clickon.ch/doPayment/{{LICENSE_ID}}' \
--header 'Content-Type: application/json' \
--header 'x-secret-key: {{YOUR_SECRET_KEY}}' \
--data-raw '{
"amount": 27500,
"note": "Order 1111-XXXX",
"payer": "256787003761"
}'
If you need example in other languages (PHP, Java, NodeJS etc.), feel free to export from our Postman collection, you will be able to download it below.
You will get the following JSON as a reply (see below). You may want to store the value of paymentId for status tracking later on.
{
"paymentId": "a7fcb077-3175-4f5f-9d23-938708a8ca27"
}
In case something goes wrong (always happens) you will get an error message as shown below. HTTP status code will be set to 500 in that case.
{
"error": "Your license is not yet configured, please use /setKeys API call to set your Live/Sandbox keys."
}
Configure your license
In order to start using our MoMo API gateway you have to set the API keys. Below you will find an example how you can do it. You must get those keys from MTN, by submitting a KYC form on https://momodeveloper.mtn.com, the process takes a while so make sure you start early!
You can also set Sandbox API keys, but please remember that no real payment requests will be sent in this case. For Sandbox always set the currencyCode to EUR
curl --location --request POST 'https://momopay.clickon.ch/setKeys/{{LICENSE_ID}}' \
--header 'Content-Type: application/json' \
--header 'x-secret-key: {{YOUR_SECRET_KEY}}' \
--data-raw '{
"subKey": "9e3604b8d7f947dcbd1b0af6275b5d61",
"apiUser": "7097c052-b50f-42f2-80c1-975d2d374e7b",
"apiKey": "e1d4c0cc0f6e4e22879f4c94d0f0f671",
"currencyCode": "EUR",
"callbackUrl": "http://acdbbc1db797.ngrok.io",
"type": "collection"
}'
Get payment status
You can get the status of your payment request in case you supplied a valid callbackUrl in the doPayment request. See an example above. Our gateway will make a POST callback to this URL with the following information:
{
"paymentId": "a7fcb077-3175-4f5f-9d23-938708a8ca27",
"status": "paid"
}
In case of an error you will get the following:
{
"paymentId": "a7fcb077-3175-4f5f-9d23-938708a8ca28",
"status": "failed"
"reason": "internal_processing_error"
}
Another way of getting the payment status is to request it directly from the gateway, see below.
curl --location --request POST 'https://momopay.clickon.ch/getPaymentStatus/{{LICENSE_ID}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"paymentId": "a7fcb077-3175-4f5f-9d23-938708a8ca27"
}'
Request payment from Airtel or Orange Money
You can request payments from Airtel & Orange Money wallets, however for both of them you must get in touch with us, so we can instruct you how to activate these services. Important, we only support Airtel and Orange Money for the Live payments.
Below you can see how you can request money from Orange Money or Airtel. Keep in mind that you must have a KYC verified account with Orange and Airtel for this!
curl --location --request POST 'https://momopay.clickon.ch/doPayment/{{LICENSE_ID}}' \
--header 'Content-Type: application/json' \
--header 'x-secret-key: {{YOUR_SECRET_KEY}}' \
--data-raw '{
"amount": 56050,
"note": "Order XXXX-2921",
"payer": "256752509750",
"network": "{orange|airtel}"
}'
Get your licence
Request a licence through the contact form. We send the LICENSE_ID and YOUR_SECRET_KEY to your email address.
159 USD per year, 12 months of support & updates for 1 application, unlimited payments. 0 % commission fee!
100% No-Risk Money Back Guarantee
Although we don’t think you’ll ever want one, we’ll gladly provide a refund if it’s requested within 7 days of purchase. No questions asked, you get a full refund.
Need help? Or have a question?
We will try to process every support question, but please give us at least 2 hours time.
IMPORTANT, do not use Web version of Postman, it is NOT SUPPORTED, get the real Windows/Mac Postman App here.