# Wallet Addresses

{% hint style="info" %}
Merchants that use the **Payment Product** and want to receive settlements in Stablecoins must register their wallet address 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 Wallet Address

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

Endpoint to register subaccount external wallets for Crypto withdrawal.

#### 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   |
| name<mark style="color:red;">\*</mark>    | String | Nickname for the wallet                                        |
| address<mark style="color:red;">\*</mark> | String | Wallet Address                                                 |
| network<mark style="color:red;">\*</mark> | String | Check coverage page for more details of the supported networks |

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

```json
{
  "name": "string",
  "address": "string",
  "asset": "string",
  "Network": "string",
  "id": "string",
  "type": "string"
  "message": "string",
  "updated_at": "string"
  "created_at": "string",
  "deleted_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/wallet-address' \
  -H 'accept: application/json' \
  -H 'X-sub-account-id: fe2f30db...5b5e7c' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g' \
  -d '{
  "address": "bc1qdus0ghjhxcr3eyw4rcswlpvr8w34wpf6thexs8",
  "asset": "BTC",
  "name": "My personal BTC Wallet Address",
  "network": "bitcoin"
}'
```

{% endcode %}

**Response Example:**

```json
{
  "address": "bc1qdus0ghjhxcr3eyw4rcswlpvr8w34wpf6thexs8",
  "asset": "BTC",
  "created_at": "2023-09-16T19:04:22.407027Z",
  "deleted_at": "",
  "id": "a2b6b539-2e13-4434-8ae7-7feb99484097",
  "message": "",
  "name": "My personal BTC Wallet Address",
  "network": "bitcoin",
  "updated_at": "2023-09-16T19:04:22.407027Z",
  "wallet_type": "external"
}
```

## Delete Subaccount's Wallet Address

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

This endpoint deletes the external wallet address associated with a specific subaccount.

#### 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                              |
| ------------------------------------ | ------ | ---------------------------------------- |
| id<mark style="color:red;">\*</mark> | String | Wallet address ID that should be deleted |

{% 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/wallet-address' \
  -H 'accept: application/json' \
  -H 'X-sub-account-id: fe2f30db...5b5e7c' \
  -H 'Content-Type: application/json' \
  -H 'Authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCIsImtpZCI6InJlaEF1NURPY...ctfx2I4g' \
  -d '{
  "wallet_id": "a2b6b539-2e13-7854-8ae7-7feb99484097",
}'
```

{% endcode %}

**Response Example:**

```json
{
  "message": "success"
}
```


---

# 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/wallet-addresses.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.
