> ## Documentation Index
> Fetch the complete documentation index at: https://docs.daya.co/llms.txt
> Use this file to discover all available pages before exploring further.

# Withdraw merchant balance

> Send USD from your merchant balance to a supported on-chain destination

## Overview

Creates a withdrawal from your **withdrawal balance** to a supported on-chain address. Withdrawals draw from the withdrawal balance only — not directly from the collection balance. If the needed funds are still in the collection balance, move them first via [`POST /v1/merchant/balance/transfer`](https://docs.daya.co/api-reference/merchant-balance/transfer-merchant-balance).

> [!WARNING]
>
> Provide a unique `X-Idempotency-Key` for each withdrawal attempt so retries do not create duplicate transfers.

> [!TIP]
>
> Before creating a withdrawal, check [Get Merchant Balance](https://docs.daya.co/api-reference/merchant-balance/get-merchant-balance.md) and validate the destination chain with [List Supported Chains](https://docs.daya.co/api-reference/supported-chains/list-supported-chains.md).

> [!WARNING]
>
> Production supports USDT withdrawals on BNB Smart Chain (`BSC`) and Polygon. Use the token-level metadata from `GET /v1/supported-chains` as the authoritative live source before submitting a withdrawal.

## Authentication

**X-Api-Key** `string` *required*

Your merchant API key

## Headers

**X-Idempotency-Key** `string` *required*

Unique request identifier used to deduplicate retries.

**Example:** `withdrawal-20260310-0001`

## Request Body

**amount\_usd** `string` *required*

Amount to withdraw in USD decimal format.

**Example:** `12.3400`

**token** `string` *required*

Token to send on-chain.

**Allowed values:** `USDC`, `USDT`

**chain** `string` *required*

Destination chain for the withdrawal.

**Allowed values:** `SOLANA`, `TRON`, `APTOS`, `BASE`, `BSC`, `POLYGON`, `ETHEREUM`

**destination\_address** `string` *required*

Address that will receive the withdrawal.

**Example:** `4vJ9JU1bJJE96FWSJN`

> [!NOTE]
>
> Make sure the address format matches the selected chain and token pair.

## Request Examples

```bash cURL theme={"dark"}
curl --request POST \
  --url https://api.daya.co/v1/merchant/withdrawals \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --header 'X-Idempotency-Key: withdrawal-20260310-0001' \
  --data '{
    "amount_usd": "12.3400",
    "token": "USDC",
    "chain": "SOLANA",
    "destination_address": "4vJ9JU1bJJE96FWSJN"
  }'
```

```json Request Body theme={"dark"}
{
  "amount_usd": "12.3400",
  "token": "USDC",
  "chain": "SOLANA",
  "destination_address": "4vJ9JU1bJJE96FWSJN"
}
```

```javascript JavaScript theme={"dark"}
const response = await fetch('https://api.daya.co/v1/merchant/withdrawals', {
  method: 'POST',
  headers: {
    'X-Api-Key': 'YOUR_API_KEY',
    'Content-Type': 'application/json',
    'X-Idempotency-Key': 'withdrawal-20260310-0001'
  },
  body: JSON.stringify({
    amount_usd: '12.3400',
    token: 'USDC',
    chain: 'SOLANA',
    destination_address: '4vJ9JU1bJJE96FWSJN'
  })
});

const withdrawal = await response.json();
console.log(withdrawal);
```

## Response

**data** `object`

Withdrawal creation result.

**data properties**

**transaction\_id** `string`

Identifier for the created transfer.

**Example:** `transactions/abc123`

### Success Response

```json 201 Created theme={"dark"}
{
  "data": {
    "transaction_id": "transactions/abc123"
  }
}
```

## Error Responses

```json 400 Bad Request theme={"dark"}
{
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "Invalid request",
    "request_id": "550e8400-e29b-41d4-a716-446655440000",
    "validation": "amount_usd must be greater than zero"
  }
}
```

```json 409 Conflict theme={"dark"}
{
  "error": {
    "code": "IDEMPOTENCY_CONFLICT",
    "message": "Idempotency key already used with a different payload",
    "request_id": "550e8400-e29b-41d4-a716-446655440000"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.