# Bank Account Information

{% hint style="info" %}
Merchants that use the **Payment Product** must register their preferred bank account for settlement in the Dashboard. This section is dedicated to registering bank accounts for users who are transacting with the Exchange or Pay Anything products.
{% endhint %}

## Register Subaccount's Bank Account

<mark style="color:green;">`POST`</mark> `https://live.betaapp.com/v1/subaccount/bank-account/external`

Endpoint to register external bank accounts for subaccounts. This will be used during the Fiat withdrawal process.

#### Headers

| Name                                               | Type   | Description            |
| -------------------------------------------------- | ------ | ---------------------- |
| Authorization<mark style="color:red;">\*</mark>    | String | Bearer {access\_token} |
| x-sub-account-id<mark style="color:red;">\*</mark> | String | Subaccount ID          |
| accept<mark style="color:red;">\*</mark>           | String | application/json       |

#### Request Body

| Name                                         | Type   | Description                                                                                                                                      |
| -------------------------------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------------------------------ |
| asset<mark style="color:red;">\*</mark>      | String | Check coverage page for more details of the supported assets. It must be a Fiat Asset.                                                           |
| name<mark style="color:red;">\*</mark>       | String | Nickname for the bank account                                                                                                                    |
| bank\_name<mark style="color:red;">\*</mark> | String | Bank name                                                                                                                                        |
| branch<mark style="color:red;">\*</mark>     | String | Branch ID if applicable                                                                                                                          |
| country<mark style="color:red;">\*</mark>    | String | Check coverage page for more details of the supported countries. Follow[ ISO 3166](https://en.wikipedia.org/wiki/List_of_ISO_3166_country_codes) |
| instant\_payment                             | String | Instant Payment number                                                                                                                           |
| instant\_payment\_type                       | String | Check coverage page for more details of the supported instant payment types.                                                                     |
| account<mark style="color:red;">\*</mark>    | String | Bank Account number                                                                                                                              |
| City                                         | String | Bank's city address. Required if USA.                                                                                                            |
| Postal Code                                  | String | Postal code of the Bank's address.  Required if USA.                                                                                             |
| State                                        | String | State of the Bank's address. Required if USA. Follows [ISO 3166-2:US](https://en.wikipedia.org/wiki/ISO_3166-2:US) if USA.                       |
| Steet\_line                                  | String | Street line of the Bank's address. Required if USA                                                                                               |

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

```json
{
  "account": "string",
  "asset": "string",
  "bank_name": "string",
  "branch": "string",
  "bank_account": "string",
  "country": "string",
  "created_at": "string",
  "deleted_at": "string",
  "id": "string",
  "instant_payment": "string",
  "instant_payment_type": "string",
  "message": "string",
  "updated_at": "string"
}
```

{% endtab %}

{% tab title="400: Bad Request Error message " %}

```json
{
  "message": "string"
}
```

{% endtab %}
{% endtabs %}

**Request Example:**

{% code overflow="wrap" %}

```json
curl -X 'POST' \
  'https://live.betaapp.com/v1/subaccount/bank-account/external' \
  -H 'accept: application/json' \
  -H 'X-sub-account-id: fe2f30db...5b5e7c' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g' \
  -d '{
  "asset": "MXN",
  "name": "My personal MXN Account",
  "bank_name": "BBVA",
  "branch": "000",
  "account": "000000009",
  "country": "Mexico",
  "instant_payment": "74618537489"
  "instant_payment_type": "SPEI",
  "City": "Mexico city",
  "postal_code": "235892",
  "state": "Ciudad de México",
  "street_line": "Avenida Álvaro Obregón",
}'
```

{% endcode %}

**Response Example:**

```json
{
  "id": "f7856b5e-8d31-4195-99b2-c153bc0b6eaa",
  "bank_name": "BBVA",
  "branch": "000",
  "account": "000000009",
  "bank_type": "external",
  "instant_payment": "74618537489",
  "instant_payment_type": "SPEI",
  "country": "Mexico",
  "asset": "MXN",
  "City": "Mexico city",
  "postal_code": "235892",
  "state": "Ciudad de México",
  "street_line": "Avenida Álvaro Obregón",
  "created_at": "2023-11-22T11:44:28.36033647Z",
  "updated_at": "2023-11-22T11:44:28.36033647Z",
  "deleted_at": null
}
```

## Delete Subaccount's Bank Account Details

<mark style="color:red;">`DELETE`</mark> `https://live.betaapp.com/v1/subaccount/bank-account/external/id/{id}`

#### Headers

| Name                                            | Type   | Description      |
| ----------------------------------------------- | ------ | ---------------- |
| Authorization<mark style="color:red;">\*</mark> | String | JWT Token        |
| x-sub-account-id                                | String | Subaccount ID    |
| accept                                          | String | application/json |

#### Request Body

| Name                                 | Type   | Description     |
| ------------------------------------ | ------ | --------------- |
| id<mark style="color:red;">\*</mark> | String | Bank Account ID |

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

```json
{
  "message": "string"
}
```

{% endtab %}

{% tab title="400: Bad Request Error message " %}

```json
{
  "message": "string"
}
```

{% endtab %}
{% endtabs %}

**Request Example:**

{% code overflow="wrap" %}

```json
curl -X 'DELETE' \
  'https://live.betaapp.com/v1/subaccount/bank-account/id/f7856b5e-8d31-4195-99b2-c153bc0b6eaa' \
  -H 'accept: application/json' \
  -H 'X-sub-account-id: fe2f30db...5b5e7c' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g'
```

{% endcode %}

**Response Example:**

```json
null
```


---

# 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://docs.betaramps.com/documentation-beta-ramps/registering-subaccounts/bank-account-information.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.
