> ## 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.

# Transfer merchant balance

> Transfer funds from collection to withdrawal balance

## Overview

Transfers USD from the merchant collection balance into the merchant withdrawal balance. This is a USD-only operation.

## Authentication

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

<ParamField header="X-Idempotency-Key" type="string" required>
  Unique idempotency key for request deduplication

  **Example:** `550e8400-e29b-41d4-a716-446655440000`
</ParamField>

## Request Body

<ParamField body="amount_usd" type="string" required>
  Amount in USD to transfer from collection to withdrawal balance.

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

## Request Example

<CodeGroup>
  ```bash cURL theme={null}
  curl --request POST \
    --url https://api.daya.co/v1/merchant/balance/transfer \
    --header 'X-Api-Key: YOUR_API_KEY' \
    --header 'X-Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000' \
    --header 'Content-Type: application/json' \
    --data '{
      "amount_usd": "100.00"
    }'
  ```
</CodeGroup>

## Response

<ResponseField name="data" type="object" required>
  Updated merchant balance after the transfer.

  <Expandable title="data properties">
    <ResponseField name="data.collection_balance_usd" type="string" required>
      Updated collection balance in USD
    </ResponseField>

    <ResponseField name="data.withdrawal_balance_usd" type="string" required>
      Updated withdrawal balance in USD
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "data": {
      "collection_balance_usd": "400.0000",
      "withdrawal_balance_usd": "600.0000"
    }
  }
  ```

  ```json 400 Bad Request theme={null}
  {
    "error": {
      "code": "INSUFFICIENT_BALANCE",
      "message": "Insufficient collection balance",
      "request_id": "550e8400-e29b-41d4-a716-446655440000"
    }
  }
  ```
</ResponseExample>
