Client
Last updated
Last updated
Represent a Client agent that interact with all MTN MOMO API product
collection( subscriptionKey )
Method to get collection client
subscriptionKey (string) - The subscription key of the collection product
The collection agent
disbursements( subscriptionKey )
Method to get disbursement client
subscriptionKey (string) - The subscription key of the disbursement product
The disbursement agent
await
createApiUser( uuid, subscriptionKey, urlCallback )
Method in charge of creating API USER from wallet provider
uuid (string) - a valid UUID version 4
subscriptionKey (string) - the subscription key of any product
urlCallback (Optional[string]) - the website receiving call back
[boolean, data] boolean is true if the user was created successfully
array
await
getApiUser( uuid, subsciptionKey )
Method in charge of getting API USER from wallet provider
uuid (string) - a valid UUID version 4
subscriptionKey (string) - the subscription key of the product that user was created for
[True, data]
array.
await
createApiKey( uuid, subscriptionKey )
Method in charge of creating API KEY from wallet provider
uuid (string) - a valid UUID version 4
subscriptionKey (string) - the subscription key of the product that user was created for
[True, data]
array
getReferenceId()
Method to create UUID version 4
UUID version 4
String
isSandbox()
method to turn on sandbox environment
If you intend to run in sandbox environment, make sure to call this method before any type of request
basicToken( apiUser, apiKey )
Method to create basic token from API USER & API KEY
apiUser (string) - the API USER
apiKey (string) - the API KEY
Basic token
str
bearerToken( token )
Method to convert access token to Bearer token
token (string) - the authentification token
Bearer token
string