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

# Create bank ramp-off

> Withdraw cryptocurrency to a bank account.

Creates and executes a bank ramp-off transaction to withdraw cryptocurrency to a bank account. Requires an API key with access level 2 or higher.

## Body

<ParamField body="wallet_id" type="string" required>
  Virtual wallet identifier.
</ParamField>

<ParamField body="amount" type="number" required>
  Amount in cryptocurrency to convert and withdraw.
</ParamField>

<ParamField body="bank_account_id" type="string" required>
  Bank account identifier for withdrawal.
</ParamField>

<ParamField body="reference" type="string">
  Bank statement reference (concept) for the transfer. Required when the destination bank account currency is `COP`; ignored otherwise. Maximum 18 characters.
</ParamField>

## Response

<ResponseField name="id" type="string">
  Unique ramp-off operation identifier.
</ResponseField>

<ResponseField name="state" type="string">
  Current state of the operation.
</ResponseField>

<ResponseField name="source_payment_rail" type="string">
  Source payment rail. One of `PIX`, `WIRE`, `ACH`, `SEPA`, `SPEI`, `PIX`, `FASTER_PAYMENTS`, `CO_BANK_TRANSFER`, `BRE_B`.
</ResponseField>

<ResponseField name="source_currency" type="string">
  Source cryptocurrency token. One of `USDC`, `USDT`.
</ResponseField>

<ResponseField name="destination_payment_rail" type="string">
  Destination payment rail. One of `ACH`, `WIRE`, `SEPA`, `SPEI`, `PIX`, `FASTER_PAYMENTS`, `CO_BANK_TRANSFER`, `BRE_B`.
</ResponseField>

<ResponseField name="destination_currency" type="string">
  Destination currency. One of `USD`, `EUR`, `MXN`, `BRL`, `GBP`, `COP`.
</ResponseField>

<ResponseField name="amount" type="number">
  Amount to be withdrawn.
</ResponseField>

<ResponseField name="blockchain_memo" type="string">
  Blockchain transaction memo or reference.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl -X POST "https://api.cryptomate.me/virtual-wallets/bank-ramps/ramp-off" \
    -H "x-api-key: $CRYPTOMATE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "wallet_id": "vw_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "amount": 0.5,
      "bank_account_id": "ba_xyz789"
    }'
  ```

  ```bash cURL (COP destination) theme={null}
  curl -X POST "https://api.cryptomate.me/virtual-wallets/bank-ramps/ramp-off" \
    -H "x-api-key: $CRYPTOMATE_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "wallet_id": "vw_a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
      "amount": 25,
      "bank_account_id": "ba_co_abc123",
      "reference": "INV-12345"
    }'
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "id": "rampoff_abc123",
    "state": "pending",
    "source_payment_rail": "POLYGON",
    "source_currency": "USDC",
    "destination_payment_rail": "ACH",
    "destination_currency": "USD",
    "amount": 950.00,
    "blockchain_memo": "WITHDRAWAL-REF-123"
  }
  ```

  ```json 400 Reference Too Long theme={null}
  {
    "code": "VAL",
    "message": "reference must be at most 18 characters"
  }
  ```

  ```json 400 Reference Missing theme={null}
  {
    "code": "VAL",
    "message": "reference is required for COP ramp-off"
  }
  ```

  ```json 400 Insufficient Balance theme={null}
  {
    "code": "APP_ERROR",
    "message": "Failed to transfer ramp off of 0.5 of client client_ghi789: Insufficient balance"
  }
  ```

  ```json 400 Holding Wallet Balance theme={null}
  {
    "code": "APP_ERROR",
    "message": "Failed to transfer ramp off of 0.5 of client client_ghi789: Not enough balance in holding wallet"
  }
  ```

  ```json 404 Wallet Not Found theme={null}
  {
    "code": "NOT_FOUND",
    "message": "Wallet not found"
  }
  ```

  ```json 404 Bank Account Not Found theme={null}
  {
    "code": "NOT_FOUND",
    "message": "Bank account ba_xyz789 for company company_xyz789 not found"
  }
  ```
</ResponseExample>
