MTN MoMo API with Postman

Make MoMo API requests in Postman

MTN MoMo is mobile payment system available in Uganda, Ghana, Zambia, Cameroon, Eswatini, Ivory Coast, Benin, Rwanda, Guinea-Conakry, Congo, Liberia and South Africa.

In the nutshell MTN MoMoPay enables merchants to receive payment for goods and services using MTN Mobile Money. It is accessible over the mobile phone (or as a smartphone App) for both customers and merchants. With MoMoPay, merchants can sell airtime and earn commission, pay suppliers, pay salaries as well as transfer money to the bank.

MTN has opened an API for the developers to create Apps for merchants to received payments. All developer information is available online on https://momodeveloper.mtn.com.

After doing a few projects in Uganda and Swaziland we have noticed that it usually takes hours of research and background knowledge to understand how this API actually works. One of the main burdens is the fact that there is no good way to test the system, without going Live. It is particularly challenging for the foreign company, as currently MTN allows only resident companies to apply for the Live usage.

So after many hours on public support forums we decided to make a small contribution to the developer community and explain how to get started with MoMoPay Open API & Postman, so  I will explain:

  • Demystifying MoMoPay API Sandbox
  • List Sandbox limitations & differences comparing to the Live setup
  • Explain why I use Postman for MoMoPay App development
  • Introduce my YouTube video which shows how to use Postman with MoMoPay API
  • Show where to download MoMoPay API Postman Collection & Sandbox environment file

Letโ€™s dive right in.

Demystifying MoMoPay API Sandbox

MoMoPay API Sandbox is the official way to test your application before going Live. You can get Sandbox access after signing up on momodevelopers.mtn.com/signup

After the signup you will be able to pick API you want, like Collections, Disbursements, Collection Widget and generate subscription keys for the Sandbox environment. You must know that these subscription keys are not for the Live usage. You will get the Live subscription keys on the other portal momoapi.mtn.com, there is no public signup here, you get the username/password from MTN directly, after KYC approval process (takes a while actually).

Once you are in the Sandbox you must always keep in mind that you have certain differences from the Live MoMoPay system, the main are:

  • Sandbox is not requesting real money, so no USSD request on your phone. no matter how hard you try ๐Ÿ˜‚
  • Sandbox has an additional API to provision API user and access key. This API doesn’t exist in Live, you will generate the user and the key on MTN Partner Portal
  • In the Sandbox you can only use EURย currency and certain test numbers from Sweden ๐Ÿ‡ธ๐Ÿ‡ช ๐Ÿฅถ
  • Sandbox is not able to callback your application, to notify about payment status. This one is a sad limitation. ๐Ÿ˜ž
  • Account balance will return “weird” results, like -1 and error messages. Probably made to test different cases.
  • ๐Ÿ’ฐ QR Code Collection Widget is broken on Sandbox.
ย 

Knowing these differences & limitations will help you a lot when building your MoMoPay Apps and will save tons of time! I will provide a Postman environment file for MoMoPay Sandbox together with the Postman collection.

Why i use Postman for MoMo API

Use Postman has several advantages, especially for MoMo development

  • You can switch from Sandbox and Live environments with one click, just great!
  • Postman is a stand alone tool, doesn’t depend on momodeveloper.mtn.com portal which sometimes goes down.. ๐Ÿ˜ž ๐Ÿ˜ž ๐Ÿ˜ž
  • You can share Postman collection with your remote team located in the other country! Wow, welcome ๐Ÿ‡ฎ๐Ÿ‡ณ and ๐Ÿ‡ป๐Ÿ‡ณ
  • You can also share your environment files with pre-set keys, saves a lot of time!
  • Postman works great even if your Internet connection is not the best, still happens these days.
  • You can export code from Postman in Java, NodeJS, PHP, Python and other languages ๐Ÿพ
  • You can monitor the status of MoMoPay API in Postman after your App went Live, how cool is that

ย 

Sleeping already? ๐Ÿ˜ƒ Let’s move on!

Video tutorial on how to use Postman with MoMo

A few days ago I made this video, this to date has 200 views and 20 likes, this is my first video, so i’m really proud here  I will be some happy if you could do all that YouTube stuff and like, commend and subscribe to m channel.

IMPORTANT, do not use Web version of Postman, it is NOT SUPPORTED YET, get the real Windows/Mac Postman App here.

IMPORTANT, please watch this video before or right after your download Postman Collection and Sandbox environment file, it will really help you to navigate around and reduce support requests for us ๐Ÿ™ thank you!

Fill in the form to download Postman MoMoPay API collection

Once you fill in the form we will send your our MoMoPay Postman collection by Email. We are offering this service free of charge, if you like it please comment and thumb upย our YouTube video!

IMPORTANT, please check your Spam and Junk folders before contacting us! Thank you ๐Ÿ™

If you still need support, please send me an Email at [email protected]

So what's next?

After testing our Postman Collection in Sandbox the next step is to move your Application to Live, you can do that on momodeveloper.mtn.com, look for the “Go Live” in the menu. You will need to submit KYC forms and wait, wait and one more time wait.

Eventually, you will get a login to momoapi.mtn.com and MTN Partner portal, where you generate the keys. Once you have the Live keys, you can import Postman Live environment files containing Production endpoints. You can download them below.

One day i will make a post about how to use Postman Collection in Live and show you how it all looks on the mobile phone! With real requests! Piece for the world ๐Ÿ™ and stay healthy!