notifyUrl 发送一条 HTTPS POST 请求。
为什么使用 Webhook
- 支付结果的权威来源(优先级高于跳转与轮询)
- 异步通知,不会阻塞用户流程
- 覆盖所有状态变更事件
Documentation Index
Fetch the complete documentation index at: /docs/llms.txt
Use this file to discover all available pages before exploring further.
Waffo Webhook 异步事件通知的概述与配置要求。
notifyUrl 发送一条 HTTPS POST 请求。
| 要求 | 描述 |
|---|---|
| 协议 | HTTPS(TLS 1.2+) |
| 可达性 | 可通过公网访问 |
| 签名 | Waffo 使用 Waffo 私钥对请求 body 签名;商户必须使用 Waffo 公钥验证 X-SIGNATURE |
| 响应 body | {"message": "success"} / {"message": "failed"} / {"message": "unknown"} |
{
"header": {
"Content-Type": "application/json",
"X-SIGNATURE": "..."
},
"body": {
"eventType": "PAYMENT_NOTIFICATION",
"result": { ... }
}
}
{
"header": {
"Content-Type": "application/json"
},
"body": {
"message": "success"
}
}
| 响应 | 描述 |
|---|---|
success | 已成功接收并处理 |
failed | 处理失败;Waffo 将重试 |
unknown | 状态未知;Waffo 将重试 |
# cloudflared
cloudflared tunnel --url http://localhost:3000
# ngrok
ngrok http 3000
此页面对您有帮助吗?