📖
mobilemoney.js documentation
  • welcome to mobilemoney.js
  • Introduction
  • Quick Start
  • Getting Help
  • Reference
    • API Reference
      • Client
        • Collection
        • Disbursements
      • Body details
Powered by GitBook
On this page
  • collection( subscriptionKey )
  • disbursements( subscriptionKey )
  • await createApiUser( uuid, subscriptionKey, urlCallback )
  • await getApiUser( uuid, subsciptionKey )
  • await createApiKey( uuid, subscriptionKey )
  • getReferenceId()
  • isSandbox()
  • basicToken( apiUser, apiKey )
  • bearerToken( token )
  1. Reference
  2. API Reference

Client

PreviousAPI ReferenceNextCollection

Last updated 2 years ago

Represent a Client agent that interact with all MTN MOMO API product

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 )

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 )

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 )

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 )

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]

{
  "apiKey": "string"
}

Return Type:

array

getReferenceId()

Method to create UUID version 4

Return :

UUID version 4

Return Type:

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

Parameter :

  • apiUser (string) - the API USER

  • apiKey (string) - the API KEY

Return :

Basic token

Return Type :

str

bearerToken( token )

Method to convert access token to Bearer token

Parameter :

  • token (string) - the authentification token

Return :

Bearer token

Return Type :

string

Collection
Disbursement