> For the complete documentation index, see [llms.txt](https://momopy.rewriteapi.cm/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://momopy.rewriteapi.cm/reference/api-reference/client.md).

# Client

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

### `collection( subscription_key )` <a href="#collection_client" id="collection_client"></a>

Method to get collection client

#### Parameter :

&#x20;         **subscription\_key** (str) - The subscription key of the collection product

#### Return :

The collection agent

#### Return Type :

[Collection](/reference/api-reference/client/collection.md)

### `disbursements( subscription_key )`

Method to get disbursement client

#### Parameter:

&#x20;          **subscription\_key** (str) - The subscription key of the disbursement product

#### Return :

The disbursement agent

#### Return Type:

[Disbursement](/reference/api-reference/client/disbursements.md)

### *`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&#x20;
* **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 )`

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.   &#x20;

### *`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)

{% tabs %}
{% tab title="data" %}

```json
{
  "apiKey": "string"
}
```

{% endtab %}
{% endtabs %}

#### Return Type:

Tuple

### `get_reference_id()`

Method to create UUID version 4

#### Return :

UUID version 4

#### Return Type:

Str

### `is_sandbox()`

method to turn on sandbox environment

{% hint style="danger" %}
If you intend to run in sandbox environment, make sure to call this method before any type of request
{% endhint %}

### `basic_token( apiuser, apikey )`

Method to create basic token from API USER & API KEY

#### Parameter :

* **apiuser** (str) - the API USER&#x20;
* **apikey** (str) - the API KEY

#### Return :

Basic token

#### Return Type :

str

### `bearer_token( token )`

Method to convert access token to Bearer token

#### Parameter :

* token (str) - the authentification token

#### Return :

Bearer token

#### Return Type :

str
