Disbursements
Represent Disbursements Client used for Disbursements product
async create_access_token()
async get_account_balance()
async get_account_balance_in()
async get_basic_user_info()
async ask_user_info()
async deposit()
async transfer()
async refund()
async get_deposit_status()
async get_transfer_status()
async get_refund_status()
async isActive()
await
create_access_token( authorization )
await
create_access_token( authorization )
Method to create access token for disbursements user
Parameters :
authorization (str) - a valid basic authentification token
Return
(bool, data)
Return Type :
Tuple
await
get_account_balance( authorization, target )
await
get_account_balance( authorization, target )
Method to get balance for disbursements user
Parameters :
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
Return Type :
Tuple
await
get_account_balance_in( currency, authorization, target )
await
get_account_balance_in( currency, authorization, target )
Method to get balance in specific currency for disbursements user
Parameters :
currency (str) - A valid ISO4217 Currency
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
Return Type :
Tuple
await
get_basic_user_info( msisdn, authorization, target )
await
get_basic_user_info( msisdn, authorization, target )
Method to get basic user info without consent for disbursements user
Parameters :
msisdn (str) - The number of the user
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
Return Type:
Tuple
await
ask_user_info( authorization, target )
await
ask_user_info( authorization, target )
Method to get user info with consent for disbursements user
Parameters :
authorization (str) - A valld bearer authentification token
target (str) - The target environment
Return :
(bool, data)
Return Type :
Tuple
await
deposit( uuid, authorization, target, body, url_callback )
await
deposit( uuid, authorization, target, body, url_callback )
Method to make deposit for disbursement user
The library is only taking in charge deposit V2
Parameters :
uuid (str) - A valid UUID version 4
authorization (str) - A valid bearer authentification token
target (str) - The target environment
body (Dict) - A dictionnary with full detail of the payment [see detail below]
According to MTN MOMO API
url_callback ( Optional[str] ) - The website receiving call back
Return :
(bool, data)
Retrun Type :
Tuple
await
transfer( uuid, authorization, target, body, url_callback )
await
transfer( uuid, authorization, target, body, url_callback )
Method to transfer for disbursement user
Parameters :
uuid (str) - A valid UUID version 4
authorization (str) - A valid bearer authentification token
body (Dict) - A dictionnary with full detail of the payment [see detail below]
url_callback ( Optional[str] ) - The website receiving call back
Return :
(bool, data)
Return Type :
Tuple
await
get_deposit_status( uuid, authorization, target )
await
get_deposit_status( uuid, authorization, target )
Method to get a withdrawal status for collection user
Parameters :
uuid (str) - A valid UUID version 4
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
According to MTN MOMO API
Return Type:
Tuple
await
refund( uuid, authorization, target, body, url_callback )
await
refund( uuid, authorization, target, body, url_callback )
Method to transfer for disbursement user
The library is only taking in charge only Refund V2
Parameters :
uuid (str) - A valid UUID version 4
authorization (str) - A valid bearer authentification token
target (str) - The target environment
body (Dict) - A dictionnary with full detail of the payment
According to MTN MOMO API
url_callback ( Optional[str] ) - The website receiving call back
Return :
(bool, data)
Return Type :
Tuple
await
get_transfer_status( uuid, authorization, target )
await
get_transfer_status( uuid, authorization, target )
Method to get transfer status for disbursement user
Parameters :
uuid (str) - A valid UUID version 4
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
According to MTN MOMO API
Return Type :
Tuple
await
get_refund_status( uuid, authorization, target )
await
get_refund_status( uuid, authorization, target )
Method to get transfer status for disbursement user
Parameters :
uuid (str) - A valid UUID version 4
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
According to MTN MOMO API
Return Type :
Tuple
await
isActive( account, account_type, authorization, target )
await
isActive( account, account_type, authorization, target )
Method to check if an account is active for a collection user
Parameters :
account (str) - The account target
account_type (str) - Specifies the type of the party ID. Allowed values [msisdn, email, party_code]. default set to msisdn
authorization (str) - A valid bearer authentification token
target (str) - The target environment
Return :
(bool, data)
Return Type :
Tuple
Last updated