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

# Create Withdrawal from Fund

> Create a withdrawal/off-ramp order with a confirmed quote. No VND is sent until the order is confirmed.

Create a withdrawal/off-ramp order that debits a partner fund balance and locks in a confirmed quote (rate, outcome, fees). **No VND is sent yet** — the order stays in a pending-confirmation state for up to **15 minutes**, after which it expires.

To actually pay out VND, call [Confirm Withdrawal](/api-reference/funds/confirm-withdraw) with the returned `order.id` before the order expires.

Use `idempotency_key` to ensure the order is not created twice.

## Authentication

<ParamField header="Partner-App-Key" type="string" required>
  Your partner app key.
</ParamField>

<ParamField header="X-HSPay-Signature" type="string" required>
  Base64-encoded Ed25519 signature of the sign data.
</ParamField>

<ParamField header="X-HSPay-Timestamp" type="string" required>
  Unix timestamp (seconds) of the request. Must be within 60 seconds of server time.
</ParamField>

## Body Parameters

<ParamField body="amount" type="string" required>
  Amount to withdraw.
</ParamField>

<ParamField body="currency" type="string" required>
  Currency of the amount. Available values: `vnd`, `token`.
</ParamField>

<ParamField body="token_symbol" type="string" required>
  Token symbol for the withdrawal (e.g., `USDT`, `USDC`, `USD1`).
</ParamField>

<ParamField body="payment_info" type="object" required>
  Bank payment information for the withdrawal recipient.

  <Expandable title="payment_info">
    <ParamField body="bank_id" type="integer" required>
      Bank ID. See [List Banks](/api-reference/banks/list-banks).
    </ParamField>

    <ParamField body="full_name" type="string" required>
      Full name of the account holder.
    </ParamField>

    <ParamField body="account_type" type="integer" required>
      Type of account number. `1` = Bank account number, `2` = ATM card number.
    </ParamField>

    <ParamField body="account_number" type="string" required>
      Bank account number.
    </ParamField>
  </Expandable>
</ParamField>

<ParamField body="callback" type="string" required>
  Callback URL for receiving withdrawal status updates.
</ParamField>

<ParamField body="reference_no" type="string">
  Optional. Use this to map the Holdstation Pay order to your internal order. Must be unique per partner.
</ParamField>

<ParamField body="idempotency_key" type="string" required>
  Idempotency key to ensure the withdrawal is not processed twice.
</ParamField>

<RequestExample>
  ```json Request theme={null}
  {
    "amount": "100.00",
    "currency": "token",
    "token_symbol": "USDT",
    "payment_info": {
      "bank_id": 970423,
      "full_name": "NGUYEN VAN A",
      "account_type": 1,
      "account_number": "03815492701"
    },
    "callback": "https://yourapp.com/api/webhooks/payment",
    "reference_no": "WITHDRAW-001",
    "idempotency_key": "unique-idempotency-key-001"
  }
  ```
</RequestExample>

<ResponseExample>
  ```json 200 theme={null}
  {
    "message": "success",
    "data": {
      "success": true,
      "code": 0,
      "error": "",
      "order": {
        "id": "550e8400-e29b-41d4-a716-446655440000",
        "code": 200001,
        "order_type": 2,
        "state": 2,
        "processing_state": 23,
        "amount": "100.00",
        "outcome": "2575000",
        "currency": "token",
        "rate": "25750",
        "reference_no": "WITHDRAW-001",
        "callback": "https://yourapp.com/api/webhooks/payment",
        "created_at": { "seconds": 1700000000, "nanos": 0 }
      }
    }
  }
  ```

  ```json 400 theme={null}
  {
    "error": "insufficient balance",
    "error_code": "INSUFFICIENT_BALANCE",
    "message": "Partner fund balance is insufficient"
  }
  ```
</ResponseExample>
