> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.6mm.com/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.6mm.com/_mcp/server.

# Webhook 与幂等

<h2 id="webhook-headers">
  Webhook 请求头
</h2>

| Header            | 说明              |
| ----------------- | --------------- |
| X-Agent-Timestamp | Unix 秒级时间戳。     |
| X-Agent-Nonce     | 防重放随机串。         |
| X-Agent-Signature | HMAC-SHA256 签名。 |

```text
timestamp + nonce + rawBody
```

<h2 id="order-idempotency">
  订单幂等
</h2>

| 场景            | 处理方式                         |
| ------------- | ---------------------------- |
| 首次划转请求        | 生成一个全局唯一 agentOrderNo。       |
| HTTP 超时       | 先查原 agentOrderNo，不要直接生成新订单号。 |
| PROCESSING 响应 | 等待 Webhook 或查询订单状态。          |
| Webhook 重复推送  | 按幂等键和终态去重。                   |