You are on page 1of 9
MoMo API Home (api-decumentation) Introduction Vapl- ocumentetion/introduction) Ccetting Started Vopi- ocumentotion/getting-strtedl) API User & AP! Key Management Wa escriph Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes (/api- documentetlon/common-error) Brand Cuidetines(lapi- documentetion/brand-guldelines) API User and API Key Management Authentication ‘There are two credenticls used in the Open APL + Subseription key + API User end API Key for Oauth 2.0 ‘The subscription key is used to give access to APIs in the API Monager portal. A user is assigned ‘subscription Key as and when the user subscribes to products in the API Manoger Portal ‘The API User and AP! Key are used fo grent eecess to the walle! system ina specie country. [APluser and Key are whelly menoged by the merchan* through Pertner Portal Merchants are allowed to genercte/tevoke API Keys through the Partner Portel However, on Sandbox Environment « Provisioning AP! is exposed fo encble developers generate ‘own API User and API Key for testing purposes only Subscription Key “subscription key can be found under user profile inthe API Manager Portal The subscription key is assigned fo the oxp-opte-subser son-key peremeter of the header. API User And API Key Management MoMo API Home (api-decumentation) Introduction Vapl- ocumentetion/introduction) Ccetting Started Vopi- ocumentotion/getting-strtedl) API User & AP! Key Management (Uepi-documentation/api= description) Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes lopi- documentetlon/common-error) Brand Cuidetines(lapi- documentetion/brand-guldelines) The APL user and API key ere provisioned cferenty inthe sandbox and production Im the Sandbox a provisioning AP! s used to create the API User and API Key, whereas in the ‘Sandbox and Production Environments Sandbox Provisioning Create API User (0) The Provider sencs.@ POST (basal) /apiuser request te Wallet platform, 0) The Provider specifies the UUID Reference ID inthe request Heeder and the subscription Key «Reference 10 will be used as the UserID for the API user to be crected ‘Walle Platform creates the User and responds with 201 MoMo API Home (api-decumentation) Introduction Vapl- ocumentetion/introduction) Ccetting Started Vopi- ocumentotion/getting-startedl) API User & AP! Key Management (Uepi-documentation/api= description) Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes lopi- documentetlon/common-error) Brand Cuidetines(lapi- documentetion/brand-guldelines) Example Request: POST (baseunt)/aptuser HITP/A.1 Host: noroseveloperatn.con XeReference-te: <72625¢5-Seds-4620-2964- 864472249456 ‘Ocp-Apitn-Subscription-Key: seta fada4se20291640F2c9e810612(‘providerCallbackHiost *elinecom) Response: Create API Key 10) The Provider sencs @ POST (base) /spiuser/(RPrUser}/apikey reques! to Wallet platform. MoMo API Home (api-decumentation) Introduction Vapl- ocumentetion/introduction) Ccetting Started Vopi- ocumentotion/getting-strtedl) API User & AP! Key Management (Uepi-documentation/api= description) Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes lopi- documentetlon/common-error/) Brand Cuidetines(lapi- documentetion/brand-guldelines) ) The Provicer specities the API User in tie URL ane subscription Key in the header. Wer ator creates the API Key and responds with 201 Crested withthe newly Created Arley in tne Bo <9 Provider now hs both AP User ond AP Key crested Example neque POST (baseiat}/apiuser/e72025(5-Sed-a6 -sbe4-tooara2foese/apikey HTTP/I.A ‘Ocp-Apim-Subscription-Key: d4stafadn4¢420191508/2¢96910632 Responee: ITP. 201 created content-type:_application/json;charse ‘ apikey" “f2db7oRcs8a¢ hc £89053817589300007 GET API User Details Iris possible to fetch API user details such es Coll Beck Host. However, isnot possible ro fetch the APL Key. Provider shell be required to generate a new Key should they lose the existing one MoMo API Home (api-decumentation) Introduction Vapl- ocumentation/introduction) Ccetting Started Vopi- ocumentotion/getting started) API User & AP! Key Management (Uepi-documentation/api= description) Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes lapi- documentetlon/common-error) Brand Cuidetines(lapi- documentetion/brand-guldelines) 10) The Provider senes.@ CET (bose /apiuser/{RerUser} request to Wallet platform. ©) The Provider specifies the API User in he URL on subseription Key in the header. {2 Wallet Platform responcs with 200 Ok and ceteils ofthe user, «) TorgetEnvironment is preconfigured te sendbox in the Sandbox environment therefore Example (GET (base apluser/ cPBERS5-Seds-460-S8et-butT22F456 ‘Ocp-Aplim-Subscription-Key: d4etanfadsaranexevederacsebie6s2 MoMo API Home (api-decumentation) Introduction Vapl- ocumentetion/introduction) Ccetting Started Vopi- ocumentotion/getting started) API User & AP! Key Management (Uepi-documentation/api= description) Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes (lapi- documentetlon/common-error) Brand Cuidetines(lapi- documentetion/brand-guldelines) HITP/A.2 200 Accepted cave: hed, 19 oct 2018 e9:16:15 GH ‘ Oauth 2.0 ‘access token using Client Credential Grant according te RFC 6749. The token received ‘according to RFC 6750 Beorer Token. ‘The AP! user and API key are used inthe basic authentication header when requesting the ‘ccess token. The API user and key are menaged inthe Pertner Gul fer the country where the ‘account is located. The Partner con creste end menage API user and key from the Partner GUI In the case of the Sandbox, she API Key and API User are managed through the Provisioning ‘The received token has en expiry time, The same foken can be used for rensaetions unit expires. A new token is requested by using the POST /token service inthe same way as the intial token. The new token con be requested for before the previous one has expired to avoie Important: The token must be treated as a credentiol and kept secret. ‘The party that have access to the token will be authenticated as the MoMo API Home (api-decumentation) Introduction Vapl- ocumentetion/introduction) Ccetting Started Vopi- ocumentotion/getting started) API User & AP! Key Management (Uepi-documentation/api= description) Use Cases Uapi- documentetion/use-cases)) Testing Vopi- documentetlon/testing/) Common Error Codes lapi- documentetlon/eommon-eror) Brand Cuidetines(lapi- documentetion/brand-guldelines) user that requested the token. The below sequence describes the flow for requesting a token and using the token in a request. POST /tken authorization: ses OST requestopay (authentication: ear __ Response (TTP 202: cent) ©) Provider system requests en access token uring the API Key and API user os ‘authentication ) Wallet platform authenticates credenticls ené responds with the access token 6) Provider system will use the access token for eny request thot is sent to Wallet Pltorm, eg, POST /reques:topay Note: Th je token shall be used fit is not expired API Methods sequence used in the API and the usage of the methods MoMo API Home (api-documentation) Introduction Vapl- ocumentetion/introduetion) Ccetting Started Vopi- ocumentotion/getting started) API User & AP! Key Management Use Cases Uapi- documentetion/use-casesi) Testing Vopi- documentetlon/testing/) Common Error Codes lapi- documentetlon/common-error/) Brand Cuidetines(lapi- documentetion/brand-guldelines) PosT 057 method is used for erecting a resource in Wallet Platform. The request inchices @ reference id whichis used to uniquely identify the specific resource that are created by the POST request iFa POST is using a reference id that is already used, then a duplication error response willbe sent tothe client: ‘The Post is an esynenronous method. The Wellet Platform will validate the request te ensure ‘The created resource wil get status PENDING. Once the request has been processed the stotus willbe updated to SUCCESSFUL or FAILED. The requester may then be naified ofthe Fina status trough callback, GET GET is used for requesting information about specific resource, The URL in the CET shall thot was provided inthe request is used es the identity ofthe resource Example: Post froquesttopsy request is sent with X-Reference-ld = 2237/ebe-374e-4346-3038-449706572637 et /rocuesttopay/ 3337 ebe-174e-42f6-a018-4F0700S70617 wil rurn the salus ofthe request PUT ‘The PUT method is used by the Open API when sending calbecks. Cellbock is sent if callback is no retry on the callback the Partner system does net respond. Ifthe callbacks not Onto the use cases Now we are ready to tcke @ ook at our Use Cases Japi-decumentation/use-cases/} fo see how MoMo API Home (api-decumentation) ‘= Getting Started Vapi-cocumentetion/getting-started/) Use Ceses Uopi-documentation/use-eases/) > Introduction Vapl- ocumentation/introduetion) Ccetting Started Vopi- ocumentotion/getting-strtedl) 01 tear & AP! Key Management cumentation/api= 0 Use Cases Uapi- documentetion/use-casesi) Documentation Vapi documentation) API Senabox coes/serviees/ealection) Testing Vopi- documentetlon/testing/) ‘Support /eonteet-eupport) Common Error Codes lapi- documentetlon/common-error) Brand Cuidetines(lapi- documentetion/brand-guldelines) Products Collections does/services/colection) Disbursements Udocs/servieesidisbursement) Collection widget Uwidget- ep) Remittances docs/servicesiremittoncs) Legal Terms & Conditions Disclaimer Privacy Policy Vprivaey)

You might also like