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

# 入金提现事件

> 当已完成的 API 入金订单中的加密货币已提现到订单目标钱包时，VelaFi 发送的 ON_RAMP_WITHDRAW_WEBHOOK 负载参考。

对于通过 API 创建、并指定了目标网络和钱包地址的入金（`BUY`）订单，VelaFi 可以在订单完成后将购买的加密货币提现到该地址。提现成功后，VelaFi 会向您的 `ON_RAMP_WITHDRAW_WEBHOOK` 端点发送一个已签名的 HTTP POST 请求。请验证 `signature` 请求头，并以 `{"callbackStatus": "SUCCESS"}` 响应以确认接收。

> [!NOTE]
>
> 自动提现到目标地址的功能由 VelaFi 按账户开通，并非每个订单都会自动提现。未自动提现的订单不会触发此 Webhook。如果您订阅了 [`CRYPTO_WITHDRAW_WEBHOOK`](https://docs.velafi.com/cn/api-reference/webhooks/crypto-withdraw-message-push)，自动提现也会触发该事件。

## 请求头

| 请求头 | 描述 |
| - | - |
| `signature` | 原始请求体的 RSA-SHA256 签名，采用十六进制编码。使用您 Webhook 的 `publicKey` 进行验证。请参阅 [Webhook 设置](https://docs.velafi.com/cn/api-reference/webhooks/webhook-setup.md)。 |
| `Content-Type` | `application/json` |

## 负载字段

**webhookId** `string`

该事件所排队推送的 Webhook ID。

**eventType** `string`

对于此事件类型，始终为 `ON_RAMP_WITHDRAW_WEBHOOK`。

**orderId** `string`

入金订单的 ID。

**userId** `string`

您的 VelaFi 账户（用户）ID。

**clientId** `string`

您提供的客户端订单标识符。如果您未提供，则省略此字段。

**network** `string`

提现所用的网络，与订单上设置的一致。

**address** `string`

目标钱包地址，与订单上设置的一致。

**crypto** `string`

订单的加密货币，例如 `USDT`。

**amount** `string`

订单的加密货币数量（与 `ORDER_WEBHOOK` 中的 `cryptoAmount` 值相同）。

**txHash** `string`

提现的链上交易哈希。不可用时省略。

**status** `string`

始终为 `succeeded`。提现失败不会触发此 Webhook。

**timestamp** `string`

本次推送尝试签名时的 Unix 时间戳（毫秒）。

## 负载示例

```json Incoming POST body theme={null}
{
  "webhookId": "ebab8a9663704e7cbbebe672c7c67912",
  "eventType": "ON_RAMP_WITHDRAW_WEBHOOK",
  "orderId": "473130522693193728",
  "userId": "455472",
  "clientId": "W658784738723",
  "network": "POL",
  "address": "0x9876543210fedcba9876543210fedcba98765432",
  "crypto": "USDT",
  "amount": "11.5",
  "txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
  "status": "succeeded",
  "timestamp": "1735280590000"
}
```

## 必需的响应

返回 HTTP `2xx` 状态（例如 `200`）及以下 JSON 响应体以确认接收：

```json Your response theme={null}
{
  "callbackStatus": "SUCCESS"
}
```

> [!NOTE]
>
> 同一事件可能会多次送达，因此请按 `orderId` 进行去重。请参阅[推送与重试](https://docs.velafi.com/cn/api-reference/webhooks/webhook-setup.md#delivery-and-retries)。


## Related topics

- [加密货币提现事件](https://docs.velafi.com/cn/api-reference/webhooks/crypto-withdraw-message-push.md)
- [资金记录事件](https://docs.velafi.com/cn/api-reference/webhooks/funding-records-message-push.md)
- [获取加密货币提现记录](https://docs.velafi.com/cn/api-reference/crypto-wallet/get-crypto-withdrawal-history.md)
- [Webhook](https://docs.velafi.com/cn/docs/guides/webhooks.md)
- [创建加密货币提现](https://docs.velafi.com/cn/api-reference/crypto-wallet/create-crypto-withdrawal.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.