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

# 稳定币支付事件

> 稳定币支付订单确认后，VelaFi 发送到您端点的 STABLE_COIN_PAYMENT_WEBHOOK 推送内容参考。

稳定币支付订单确认后，VelaFi 会向您的 `STABLE_COIN_PAYMENT_WEBHOOK` 端点发送一个已签名的 HTTP POST 请求。这是 VelaFi 发送的唯一一种稳定币支付事件。被拒绝、已取消、已退款或因金额或网络不匹配而被标记的订单不会触发 Webhook。推送内容包括完整的订单详情、区块链交易数据以及涉及的链上地址。您的端点应验证 `signature` 请求头，并返回 HTTP 200 和 `{"callbackStatus": "SUCCESS"}` 以确认接收。如果您的端点未在超时时间内响应，VelaFi 将重试投递。

## 请求头

| 请求头 | 说明 |
| - | - |
| `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`

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

**orderId** `string`

唯一的支付订单 ID。

**userId** `string`

与该支付订单关联的用户 ID。

**merchantId** `string`

拥有该支付订单的商户 ID。

**linkId** `string`

生成该订单的支付链接 ID。

**walletId** `string`

目标钱包 ID。

**walletName** `string`

目标钱包的可读名称。

**referenceId** `string`

您作为商户为该订单提供的参考编号。

**currency** `string`

支付所用的稳定币币种（例如 `USDT`、`USDC`）。

**network** `string`

网络代码（例如 `USDT-POL`、`USDT-BEP20`）。

**networkName** `string`

可读的网络名称（例如 `Polygon (POS)`、`Binance Smart Chain (BEP20)`）。

**depositAmount** `string`

付款方存入的总金额。

**feeAmount** `string`

从存入金额中扣除的交易手续费。

**receivedAmount** `string`

扣除手续费后的实收净额（`depositAmount - feeAmount`）。

**status** `string`

投递时的订单状态。由于此 Webhook 在订单确认时发送，该值通常为 `CONFIRMED`。

**fromAddress** `string`

链上发送方钱包地址。

**toAddress** `string`

链上接收方钱包地址。

**txHash** `string`

链上结算的区块链交易哈希。

**paymentLink** `string`

与该订单关联的支付链接 URL。

**createTime** `string`

订单创建时的 Unix 时间戳（毫秒）。

**cancelTime** `string`

订单未支付时将被取消的 Unix 时间戳（毫秒）。创建订单时会将其设置为 `createTime` 之后 30 分钟，因此已确认的订单也包含此字段。

**processTime** `string`

开始处理时的 Unix 时间戳（毫秒）。

**confirmTime** `string`

链上交易确认时的 Unix 时间戳（毫秒）。

**timestamp** `string`

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

## 推送示例

```json Incoming POST body theme={null}
{
  "webhookId": "ebab8a9663704e7cbbebe672c7c67912",
  "eventType": "STABLE_COIN_PAYMENT_WEBHOOK",
  "orderId": "619586512161566720",
  "userId": "9876543",
  "merchantId": "42",
  "linkId": "619570217441521664",
  "walletId": "1",
  "walletName": "Main USDT Wallet",
  "referenceId": "REF-2024-05-03-001",
  "currency": "USDT",
  "network": "USDT-POL",
  "networkName": "Polygon (POS)",
  "depositAmount": "1000",
  "feeAmount": "2.5",
  "receivedAmount": "997.5",
  "status": "CONFIRMED",
  "fromAddress": "0x1234567890abcdef1234567890abcdef12345678",
  "toAddress": "0x9876543210fedcba9876543210fedcba98765432",
  "txHash": "0xabcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890",
  "paymentLink": "https://www.velafi.com/velafi-payments?linkId=619570217441521664",
  "createTime": "1714671600000",
  "cancelTime": "1714673400000",
  "processTime": "1714672200000",
  "confirmTime": "1714672800000",
  "timestamp": "1714672801000"
}
```

## 必需的响应

请返回以下 JSON 响应体，HTTP 状态码为 `200`：

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

> [!NOTE]
>
> 所有值均以 JSON 字符串形式发送。时间戳为 Unix 毫秒，未设置的时间戳将以字符串 `"null"` 发送。`txHash` 唯一标识链上结算——如果您的合规流程有此要求，可使用它在区块链上独立验证交易的最终性。


## Related topics

- [创建 Webhook](https://docs.velafi.com/cn/api-reference/webhooks/create-webhook-endpoints.md)
- [创建全球支付订单](https://docs.velafi.com/cn/api-reference/order/create-a-fiat-to-fiat-order.md)
- [VelaFi API 文档](https://docs.velafi.com/cn/index.md)
- [全球支付事件](https://docs.velafi.com/cn/api-reference/webhooks/fiat-fiat-order-message-push.md)
- [简介](https://docs.velafi.com/cn/docs/introduction.md)


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