> ## 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`](/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.
</Warning>

<Tip>
  Before creating a withdrawal, check [Get Merchant Balance](/api-reference/merchant-balance/get-merchant-balance) and validate the destination chain with [List Supported Chains](/api-reference/supported-chains/list-supported-chains).
</Tip>

<Warning>
  Only `USDT` on `POLYGON` is withdrawal-enabled right now. Use the token-level metadata from `GET /v1/supported-chains` to validate supported combinations before submitting a withdrawal.
</Warning>

## Authentication

<ParamField header="X-Api-Key" type="string" required>
  Your merchant API key
</ParamField>

## Headers

<ParamField header="X-Idempotency-Key" type="string" required>
  Unique request identifier used to deduplicate retries.

  **Example:** `withdrawal-20260310-0001`
</ParamField>

## Request Body

<ParamField body="amount_usd" type="string" required>
  Amount to withdraw in USD decimal format.

  **Example:** `12.3400`
</ParamField>

<ParamField body="token" type="string" required>
  Token to send on-chain.

  **Allowed values:** `USDC`, `USDT`
</ParamField>

<ParamField body="chain" type="string" required>
  Destination chain for the withdrawal.

  **Allowed values:** `SOLANA`, `TRON`, `APTOS`, `BASE`, `POLYGON`, `ETHEREUM`
</ParamField>

<ParamField body="destination_address" type="string" required>
  Address that will receive the withdrawal.

  **Example:** `4vJ9JU1bJJE96FWSJN`

  <Note>
    Make sure the address format matches the selected chain and token pair.
  </Note>
</ParamField>

## Request Examples

<CodeGroup>
  ```bash cURL theme={null}
  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={null}
  {
    "amount_usd": "12.3400",
    "token": "USDC",
    "chain": "SOLANA",
    "destination_address": "4vJ9JU1bJJE96FWSJN"
  }
  ```

  ```javascript JavaScript theme={null}
  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);
  ```
</CodeGroup>

## Response

<ResponseField name="data" type="object">
  Withdrawal creation result.

  <Expandable title="data properties">
    <ResponseField name="transaction_id" type="string">
      Identifier for the created transfer.

      **Example:** `transactions/abc123`
    </ResponseField>
  </Expandable>
</ResponseField>

### Success Response

<ResponseExample>
  ```json 201 Created theme={null}
  {
    "data": {
      "transaction_id": "transactions/abc123"
    }
  }
  ```
</ResponseExample>

## Error Responses

<ResponseExample>
  ```json 400 Bad Request theme={null}
  {
    "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={null}
  {
    "error": {
      "code": "IDEMPOTENCY_CONFLICT",
      "message": "Idempotency key already used with a different payload",
      "request_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  }
  ```
</ResponseExample>
