> For the complete documentation index, see [llms.txt](https://docs.ezeebit.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.ezeebit.com/wallets-and-withdrawal/withdrawal-quote.md).

# Withdrawal Quote

Quote a crypto withdrawal fee and gross wallet debit.

**Live:**

<mark style="color:green;">`POST`</mark> [<mark style="color:blue;">https://api.ezeebit.com/open/api/v1/merchant/crypto/withdrawal/quote</mark>](https://api.ezeebit.com/open/api/v1/merchant/crypto/withdrawal/quote)

**UAT:**

<mark style="color:green;">`POST`</mark> [<mark style="color:blue;">https://uat-api.ezeebit.com/open/api/v1/merchant/crypto/withdrawal/quote</mark>](https://uat-api.ezeebit.com/open/api/v1/merchant/crypto/withdrawal/quote)

## Headers

| Name                   | Type   | Required | Value                          |
| ---------------------- | ------ | -------- | ------------------------------ |
| Content-Type           | string | Y        | application/json               |
| Ezeebit-Timestamp      | long   | Y        | Unix timestamp in milliseconds |
| Ezeebit-Nonce          | string | Y        | 32 characters                  |
| Ezeebit-Certificate-SN | string | Y        | API key issued by Ezeebit Pay  |
| Ezeebit-Signature      | string | Y        | Uppercase SHA512 signature     |

## Request Body

{% tabs %}
{% tab title="Your wallet" %}

```json
{
  "currencyUnit": "USDT",
  "currencyAmount": "100.00",
  "whitelistAddressId": 4821
}
```

{% endtab %}

{% tab title="Customer account" %}

```json
{
  "currencyUnit": "USDT",
  "currencyAmount": "100.00",
  "whitelistAddressId": 4821,
  "customerAccountId": "cust-1001"
}
```

{% endtab %}
{% endtabs %}

## Form data

| Parameter          | Type    | Required | Description                                                                            |
| ------------------ | ------- | -------- | -------------------------------------------------------------------------------------- |
| currencyUnit       | string  | Yes      | `USDT`. USDT on Ethereum is the only asset and network available for withdrawal today. |
| currencyAmount     | decimal | Yes      | Net amount received by the destination.                                                |
| whitelistAddressId | long    | Yes      | Active whitelisted destination ID.                                                     |
| customerAccountId  | string  | No       | Quote a withdrawal from one of your customer accounts instead of your own wallet.      |

The network must match the address. `settleCurrencyAmount` is the gross debit. `feeQuoteId` locks the fee for five minutes.

The response echoes `customerAccountId`, and returns `null` for your own wallet. Send the same `customerAccountId` to [Submit Withdrawal](https://docs.ezeebit.com/wallets-and-withdrawal/submit-withdrawal.md).

## Response

| Status | Description                       |
| ------ | --------------------------------- |
| 200    | Quote created                     |
| 10070  | Merchant not found                |
| 10071  | Invalid withdrawal argument       |
| 10072  | Withdrawal dependency unavailable |
| 10108  | Customer account is frozen        |
| 10121  | Customer account not found        |

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

```json
{
  "code": 200,
  "msg": "success",
  "data": {
    "feeAmount": "1.50",
    "settleCurrencyAmount": "101.50",
    "needReview": false,
    "feeQuoteId": 48291,
    "customerAccountId": null
  }
}
```

{% endtab %}

{% tab title="10071" %}

```json
{
  "code": 10071,
  "msg": "Invalid withdrawal argument",
  "data": null
}
```

{% endtab %}
{% endtabs %}
