Client
Represent a Client agent that interact with all MTN MOMO API product
collection( subscription_key )
collection( subscription_key )
Method to get collection client
Parameter :
subscription_key (str) - The subscription key of the collection product
Return :
The collection agent
Return Type :
disbursements( subscription_key )
disbursements( subscription_key )
Method to get disbursement client
Parameter:
subscription_key (str) - The subscription key of the disbursement product
Return :
The disbursement agent
Return Type:
await
create_api_user( uuid, subscription_key, url_callback )
await
create_api_user( uuid, subscription_key, url_callback )
Method in charge of creating API USER from wallet provider
Parameter :
uuid (str) - a valid UUID version 4
subscription_key (str) - the subscription key of any product
url_callback (Optional[str]) - the website receiving call back
Return :
True if the user was created successfully
Return Type:
bool
await
get_api_user( uuid, subsciption_key )
await
get_api_user( uuid, subsciption_key )
Method in charge of getting API USER from wallet provider
Parameter :
uuid (str) - a valid UUID version 4
subscription_key (str) - the subscription key of the product that user was created for
Return :
(True, data)
Return Type:
Tuple.
await
create_api_key( uuid, subscription_key )
await
create_api_key( uuid, subscription_key )
Method in charge of creating API KEY from wallet provider
Parameter :
uuid (str) - a valid UUID version 4
subscription_key (str) - the subscription key of the product that user was created for
Return :
(True, data)
Return Type:
Tuple
get_reference_id()
get_reference_id()
Method to create UUID version 4
Return :
UUID version 4
Return Type:
Str
is_sandbox()
is_sandbox()
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
basic_token( apiuser, apikey )
basic_token( apiuser, apikey )
Method to create basic token from API USER & API KEY
Parameter :
apiuser (str) - the API USER
apikey (str) - the API KEY
Return :
Basic token
Return Type :
str
bearer_token( token )
bearer_token( token )
Method to convert access token to Bearer token
Parameter :
token (str) - the authentification token
Return :
Bearer token
Return Type :
str
Last updated