Getting Started
Steps on creating your first API Request
-
Fork the Collection
-
Create Subscription Keys
-
Create API User and API Key
-
Get Access Token
-
Make Your first MoMo API Call
Step 1: Fork the collection using Run In Postman
Step 2: Create Subscription Keys
-
Sign up https://momodeveloper.mtn.com
-
Navigate to the products page Product-descriptions.
-
Select drop down on product that suits the business case and subscribe.
-
After completion, you can locate the Subscription Keys in your profile. Access additional information through the link below on creating subscription keys How to create subscription keys on MoMoDeveloper | MoMo Dev Community (mtn.com)
-
Navigate to the Variables and update as mapped below
Subscription name | Key Type | Variable |
---|---|---|
Disbursements | Primary | Disbursement_Subscription-Key |
Collections | Primary | Collection_Subscription-Key |
NOTE: Use the Primary Key
Step 3: Generate API user and API Key
-
Fork the SandBox Provisioning Collection using run in Postman
-
Run the SandBox Provisioning Collection , copy the
api user
andapi key
displayed via the console and test results. -
Navigate to the Variables of the MoMo Open APIs Collection and modify api_user and api_key respectively
Step 4: Get Access Token
An access token is automatically generated using a default api_user
and api_key
. MoMo recommends using your own api_user and api_key from Step 3 by entering the values under the Variables tab. A pre-request script will generate and manage expiry of the access_token
automatically.
Recommended to generate a new Access Token only after expiry of the Old one and**not a new token for every request**
Step 5: Make Your first MoMo API Call
-
In your workspace, navigate to your fork of the MoMo Open APIs collection.
-
Select Get Paid > Request Payment
-
Select the Send button to request a payment. On a successful call, the API returns a 202 Accepted response code
-
.Customer will receive a PIN to approve the debit from their MoMo Wallet.
-
Check configured Callback URl for status of the Request.
-
Request Status can be generated under Select Get Paid > Payment Status
-
Select the Send button to request a payment. On a successful call, the API returns a 200 OK Accepted response code, with Status of the request in the response body
Test MSISDN
Change the value for the Collection Variable MSISDN to produce the responses below.
Test Results with the different responses will be expected for go live submissions
Number | Response |
---|---|
46733123450 | Failed |
46733123451 | Rejected |
46733123452 | Timeout |
56733123453 | Success |
46733123454 | Pending |
X-Refrence-Ids are auto generated UUID version Strings and these are interpreted as request_ids. They are saved in the request Ids variables.
Golive With the Test Results
It is anticipated that you will provide the Test Results derived from the MoMo Open APIs collection. The Results must demonstrate your understanding of the API Flow and Syntax, and the testing of various sample responsesfor the APIs you plan to use.