> For the complete documentation index, see [llms.txt](https://docs.0xprocessing.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.0xprocessing.com/0xprocessing-api/binance-pay/on-chain-withdrawal-via-binance-pay.md).

# On-Chain Withdrawal via Binance pay

{% hint style="danger" %}
**Authentication Rule** The request must contain an **`APIKEY`** header with your API key. The key can be generated in the merchant dashboard under **Settings \ API .**
{% endhint %}

All requests must include the following header:

```http
APIKEY: your_api_key_here
Content-Type: application/x-www-form-urlencoded
```

Creates an on-chain withdrawal request routed through Binance to any external blockchain wallet address. The network fee is deducted from the withdrawal amount.

* **Method:** `POST`
* **Endpoint:** `https://app.0xprocessing.com/api/binancepayonchainwithdraw`

#### Request Body (x-www-form-urlencoded)

| Parameter      | Type   | Required | Description                                                                                          |
| -------------- | ------ | :------: | ---------------------------------------------------------------------------------------------------- |
| **Currency**   | string |    Yes   | Currency and network (e.g., `USDT (BEP20)`) — must match a name from `/BinanceOnchainWithdrawCoins`. |
| **ClientId**   | string |    Yes   | Client identifier in the merchant's system.                                                          |
| **ExternalId** | string |    Yes   | Unique transaction ID on the merchant side.                                                          |
| **Address**    | string |    Yes   | Recipient wallet address.                                                                            |
| **Amount**     | number |    Yes   | Withdrawal amount.                                                                                   |

#### Response Example

```json
{
    "id": 39212667,
    "type": "WithdrawOnchain",
    "destination": "0xaa15959c03bdeb35f8fa345f0055d9954dc806f6",
    "txId": null,
    "amount": 6.0,
    "fee": 0.12,
    "currency": "USDT (BEP20)",
    "date": "2026-06-01T11:32:09.7075739Z",
    "status": "pending",
    "clientId": "1234",
    "externalId": "3",
    "binanceId": null
}
```

#### Response Fields

| Field           | Type           | Description                                                    |
| --------------- | -------------- | -------------------------------------------------------------- |
| **id**          | integer        | Internal withdrawal ID in 0xProcessing.                        |
| **type**        | string         | Operation type: `WithdrawOnchain`.                             |
| **destination** | string         | Recipient's blockchain wallet address.                         |
| **txId**        | string \| null | Blockchain TX hash (null while pending).                       |
| **amount**      | number         | Withdrawal amount.                                             |
| **fee**         | number         | Network fee charged by Binance.                                |
| **currency**    | string         | Currency and network name.                                     |
| **date**        | string         | Creation timestamp in UTC (ISO format).                        |
| **status**      | string         | Status of the withdrawal (`pending` / `completed` / `failed`). |
| **clientId**    | string         | Merchant's client ID.                                          |
| **externalId**  | string         | Merchant's external transaction ID.                            |
| **binanceId**   | string \| null | Binance transaction ID (available after processing).           |

***

### Transaction Status Reference

The `status` field is present in all withdrawal responses.

| Status        | Description                                                           |
| ------------- | --------------------------------------------------------------------- |
| **pending**   | Request accepted and queued for processing.                           |
| **completed** | Transaction successfully executed.                                    |
| **failed**    | Transaction failed (e.g. invalid wallet address, insufficient funds). |
