# Create Wallet

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

```javascript
//A code snippet of how to consume the API

var myHeaders = new Headers();
myHeaders.append("Accept", "application/json");
myHeaders.append("Authorization", "Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vZGVtby5tb25pY3JlZGl0Mi50ZXN0L2FwaS92MS9jb3JlL2F1dGgvbG9naW4iLCJpYXQiOjE2NTIyMDY1ODUsImV4cCI6MTY1MjIxMDE4NSwibmJmIjoxNjUyMjA2NTg1LCJqdGkiOiJWVk05QTlaRFY0dUpXOXhEIiwic3ViIjoiVVNBRE1JTiIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.xT4A7kP8UiIIFQVDEM6NvHQxu0TkAIFBZnn4RvtaL04");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "name": "Opeoluwa",
  "wallet_type": "MERCHANT",
  "account_id": "ACC00000",
  "description": "Testing Wallet creation",
  "settlement_bank_id": "SB00000"
});

var requestOptions = {
  method: 'POST',
  headers: myHeaders,
  body: raw,
  redirect: 'follow'
};

fetch("https://demo.backend.monicredit.com/api/v1/banking/wallet", requestOptions)
  .then(response => response.text())
  .then(result => console.log(result))
  .catch(error => console.log('error', error));
```

{% endtab %}

{% tab title="PHP" %}

```php
//A code snippet of how to consume the API

<?php

$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://demo.backend.monicredit.com/api/v1/banking/wallet',
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => '',
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 0,
  CURLOPT_FOLLOWLOCATION => true,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => 'POST',
  CURLOPT_POSTFIELDS =>'{
    "name": "Opeoluwa",
    "wallet_type": "MERCHANT",
    "account_id": "ACC000000",
    "description": "Testing Wallet creation",
    "settlement_bank_id": "SB00000"
}',
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwOi8vZGVtby5tb25pY3JlZGl0Mi50ZXN0L2FwaS92MS9jb3JlL2F1dGgvbG9naW4iLCJpYXQiOjE2NTIyMDY1ODUsImV4cCI6MTY1MjIxMDE4NSwibmJmIjoxNjUyMjA2NTg1LCJqdGkiOiJWVk05QTlaRFY0dUpXOXhEIiwic3ViIjoiVVNBRE1JTiIsInBydiI6IjIzYmQ1Yzg5NDlmNjAwYWRiMzllNzAxYzQwMDg3MmRiN2E1OTc2ZjcifQ.xT4A7kP8UiIIFQVDEM6NvHQxu0TkAIFBZnn4RvtaL04',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
```

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark>&#x20;

#### Headers

| Name                                            | Type   | Description       |
| ----------------------------------------------- | ------ | ----------------- |
| Authorization<mark style="color:red;">\*</mark> | String | {{bearer\_token}} |

#### Request Body

| Name                                                   | Type   | Description             |
| ------------------------------------------------------ | ------ | ----------------------- |
| name<mark style="color:red;">\*</mark>                 | String | Test                    |
| wallet\_type<mark style="color:red;">\*</mark>         | String | MERCHANT                |
| account\_id<mark style="color:red;">\*</mark>          | String | ACC00000                |
| description<mark style="color:red;">\*</mark>          | String | Testing Wallet Creation |
| settlement\_bank\_id<mark style="color:red;">\*</mark> | String | SB00000000              |

{% tabs %}
{% tab title="200: OK " %}

```javascript
{
    // Response
}
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://monicredit.gitbook.io/mc-api/wallets/create-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
