> For the complete documentation index, see [llms.txt](https://monicredit.gitbook.io/mc-api/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://monicredit.gitbook.io/mc-api/settlement-bank/create-settlement-bank.md).

# Create Settlement Bank

{% 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.eyJpc3MiOiJodHRwczovL2RlbW8ubW9uaWNyZWRpdC5jb20vYXBpL3YxL2NvcmUvYXV0aC9sb2dpbiIsImlhdCI6MTY2ODk2NzQ0MywiZXhwIjoxNjY4OTcxMDQzLCJuYmYiOjE2Njg5Njc0NDMsImp0aSI6ImF0UE9GVHE4cU4yN2lBWlciLCJzdWIiOiJVU0FETUlOIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.shrbQUV29vXRF30qMeBN3zxlc5JXd03QyMeD6ekzudU");
myHeaders.append("Content-Type", "application/json");

var raw = JSON.stringify({
  "title": "testing",
  "account_no": "3066909043",
  "account_name": "Kodaolu Idris",
  "bank_code": "GBN",
  "bank_slug": "BNG",
  "bank_name": "required",
  "display": "YES",
  "order_no": "3843948",
  "settlement_email": "settlement@gmail.com"
});

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

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

{% endtab %}

{% tab title="PHP" %}

<pre class="language-php"><code class="lang-php">//A code snippet of how to consume the API
<strong>
</strong><strong>&#x3C;?php
</strong>
$curl = curl_init();

curl_setopt_array($curl, array(
  CURLOPT_URL => 'https://demo.backend.monicredit.com/api/v1/payment/settlement_bank',
  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 =>'{
    "title": "testing",
    "account_no" : "3066909043",
    "account_name" : "Kodaolu Idris",
    "bank_code" : "GBN",
    "bank_slug" : "BNG",
    "bank_name" : "required",
    "display" : "YES",
    "order_no" : "3843948",
    "settlement_email" : "settlement@gmail.com"
}',
  CURLOPT_HTTPHEADER => array(
    'Accept: application/json',
    'Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJodHRwczovL2RlbW8ubW9uaWNyZWRpdC5jb20vYXBpL3YxL2NvcmUvYXV0aC9sb2dpbiIsImlhdCI6MTY2ODk2NzQ0MywiZXhwIjoxNjY4OTcxMDQzLCJuYmYiOjE2Njg5Njc0NDMsImp0aSI6ImF0UE9GVHE4cU4yN2lBWlciLCJzdWIiOiJVU0FETUlOIiwicHJ2IjoiMjNiZDVjODk0OWY2MDBhZGIzOWU3MDFjNDAwODcyZGI3YTU5NzZmNyJ9.shrbQUV29vXRF30qMeBN3zxlc5JXd03QyMeD6ekzudU',
    'Content-Type: application/json'
  ),
));

$response = curl_exec($curl);

curl_close($curl);
echo $response;
</code></pre>

{% endtab %}
{% endtabs %}

<mark style="color:green;">`POST`</mark> `{{BaseURL}}/payment/settlement_bank`

#### Headers

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

#### Request Body

| Name                                                | Type   | Description             |
| --------------------------------------------------- | ------ | ----------------------- |
| title<mark style="color:red;">\*</mark>             | String | Test                    |
| merchant\_id<mark style="color:red;">\*</mark>      | String | MC00000                 |
| account\_no<mark style="color:red;">\*</mark>       | String | 0000000                 |
| account\_name<mark style="color:red;">\*</mark>     | String | Test Test               |
| bank\_code<mark style="color:red;">\*</mark>        | String | bank\_details\['value'] |
| bank\_name<mark style="color:red;">\*</mark>        | String | bank\_details\['label'] |
| settlement\_email<mark style="color:red;">\*</mark> | String | <test@test.ng>          |

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

<pre class="language-json"><code class="lang-json">{
<strong>    "status": true,
</strong>    "message": "settlement_bank.created",
    "data": {}
}
</code></pre>

{% endtab %}
{% endtabs %}
