Client
Represent a Client agent that interact with all MTN MOMO API product
collection( subscriptionKey )
collection( subscriptionKey )
Method to get collection client
Parameter :
subscriptionKey (string) - The subscription key of the collection product
Return :
The collection agent
Return Type :
disbursements( subscriptionKey )
disbursements( subscriptionKey )
Method to get disbursement client
Parameter:
subscriptionKey (string) - The subscription key of the disbursement product
Return :
The disbursement agent
Return Type:
await
createApiUser( uuid, subscriptionKey, urlCallback )
await
createApiUser( uuid, subscriptionKey, urlCallback )
Method in charge of creating API USER from wallet provider
Parameter :
uuid (string) - a valid UUID version 4
subscriptionKey (string) - the subscription key of any product
urlCallback (Optional[string]) - the website receiving call back
Return :
[boolean, data] boolean is true if the user was created successfully
Return Type:
array
await
getApiUser( uuid, subsciptionKey )
await
getApiUser( uuid, subsciptionKey )
Method in charge of getting API USER from wallet provider
Parameter :
uuid (string) - a valid UUID version 4
subscriptionKey (string) - the subscription key of the product that user was created for
Return :
[True, data]
Return Type:
array.
await
createApiKey( uuid, subscriptionKey )
await
createApiKey( uuid, subscriptionKey )
Method in charge of creating API KEY from wallet provider
Parameter :
uuid (string) - a valid UUID version 4
subscriptionKey (string) - the subscription key of the product that user was created for
Return :
[True, data]
Return Type:
array
getReferenceId()
getReferenceId()
Method to create UUID version 4
Return :
UUID version 4
Return Type:
String
isSandbox()
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 )
basicToken( apiUser, apiKey )
Method to create basic token from API USER & API KEY
Parameter :
apiUser (string) - the API USER
apiKey (string) - the API KEY
Return :
Basic token
Return Type :
str
bearerToken( token )
bearerToken( token )
Method to convert access token to Bearer token
Parameter :
token (string) - the authentification token
Return :
Bearer token
Return Type :
string
Last updated