Disbursements
Represent Disbursements Client used for Disbursements product
await
createAccessToken( authorization )
await
createAccessToken( authorization )
Method to create access token for disbursements user
Parameters :
authorization (string) - a valid basic authentification token
Return
[boolean, data]
Return Type :
array
await
getAccountBalance( authorization, target )
await
getAccountBalance( authorization, target )
Method to get balance for disbursements user
Parameters :
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
Return Type :
array
await
getAccountBalanceIn( currency, authorization, target )
await
getAccountBalanceIn( currency, authorization, target )
Method to get balance in specific currency for disbursements user
Parameters :
currency (string) - A valid ISO4217 Currency
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
Return Type :
array
await
getBasicUserInfo( msisdn, authorization, target )
await
getBasicUserInfo( msisdn, authorization, target )
Method to get basic user info without consent for disbursements user
Parameters :
msisdn (string) - The number of the user
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
Return Type:
array
await
askUserInfo( authorization, target )
await
askUserInfo( authorization, target )
Method to get user info with consent for disbursements user
Parameters :
authorization (string) - A valld bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
Return Type :
array
await
deposit( uuid, authorization, target, body, urlCallback )
await
deposit( uuid, authorization, target, body, urlCallback )
Method to make deposit for disbursement user
The library is only taking in charge deposit V2
Parameters :
uuid (string) - A valid UUID version 4
authorization (string) - A valid bearer authentification token
target (string) - The target environment
body (Object) - A dictionnary with full detail of the payment [see detail below]
According to MTN MOMO API
urlCallback ( [Optional] string ) - The website receiving call back
Return :
[boolean, data]
Retrun Type :
array
await
transfer( uuid, authorization, target, body, urlCallback )
await
transfer( uuid, authorization, target, body, urlCallback )
Method to transfer for disbursement user
Parameters :
uuid (string) - A valid UUID version 4
authorization (string) - A valid bearer authentification token
body (Object) - A dictionnary with full detail of the payment [see detail below]
urlCallback ( [Optional] string ) - The website receiving call back
Return :
[boolean, data]
Return Type :
array
await
getDepositStatus( uuid, authorization, target )
await
getDepositStatus( uuid, authorization, target )
Method to get a withdrawal status for collection user
Parameters :
uuid (string) - A valid UUID version 4
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
According to MTN MOMO API
Return Type:
array
await
refund( uuid, authorization, target, body, urlCallback )
await
refund( uuid, authorization, target, body, urlCallback )
Method to transfer for disbursement user
The library is only taking in charge only Refund V2
Parameters :
uuid (string) - A valid UUID version 4
authorization (string) - A valid bearer authentification token
target (string) - The target environment
body (Object) - A dictionnary with full detail of the payment
According to MTN MOMO API
urlCallback ( [Optional] string ) - The website receiving call back
Return :
[boolean, data]
Return Type :
array
await
getTransferStatus( uuid, authorization, target )
await
getTransferStatus( uuid, authorization, target )
Method to get transfer status for disbursement user
Parameters :
uuid (string) - A valid UUID version 4
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
According to MTN MOMO API
Return Type :
array
await
getRefundStatus( uuid, authorization, target )
await
getRefundStatus( uuid, authorization, target )
Method to get transfer status for disbursement user
Parameters :
uuid (string) - A valid UUID version 4
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
According to MTN MOMO API
Return Type :
array
await
isActive( account, accountType, authorization, target )
await
isActive( account, accountType, authorization, target )
Method to check if an account is active for a collection user
Parameters :
account (string) - The account target
accountType (string) - Specifies the type of the party ID. Allowed values [msisdn, email, party_code]. default set to msisdn
authorization (string) - A valid bearer authentification token
target (string) - The target environment
Return :
[boolean, data]
Return Type :
array
Last updated