支付
退款状态通知
退款单状态变更时,GatePay 发送 bizType 为 PAY_REFUND 的 webhook 通知。
商户须校验签名,处理成功后返回 {"returnCode":"SUCCESS","returnMessage":""}。通知失败时按 通知概览 中的间隔重试。
WEBHOOK
Documentation Index
Fetch the complete documentation index at: https://docs.gate.com/llms.txt
Use this file to discover all available pages before exploring further.
概述
本页说明webhook refundNotify。完整的参数、响应结构与示例由上方关联的 OpenAPI 或 webhook 定义渲染。
退款单状态变更时,GatePay 向商户配置的 callback URL 发送异步通知(bizType 为 PAY_REFUND)。
说明
触发情形
- 退款单状态发生改变时(退款成功、处理中或被拒绝等),GatePay 向商户注册时配置的 callback URL 发送通知
- 若通知投递失败,重试规则见 通知概览。
bizType 为 PAY_REFUND)。退款查询与对账时,请优先使用商户侧唯一标识 refundRequestId。
查单兜底
- 调用退款接口创建退款单后,接口成功仅表示受理,不代表最终退款结果。
- 优先等待本页
PAY_REFUND回调;若 10 秒内未收到状态通知,请调用 查询退款详情(GET /v2/pay/refund/details),以refundRequestId为准。
消息结构
| 字段名 | 类型 | 说明 |
|---|---|---|
bizType | string | 固定为 PAY_REFUND |
bizId | string | 退款单 ID |
bizStatus | string | 退款单状态,见下表 |
client_id / clientId | string | 商户 client_id(顶层字段名可能为 client_id 或 clientId) |
data | string | 业务数据 JSON 字符串 |
消息结构示例
bizStatus 枚举值
| 值 | 说明 |
|---|---|
REFUND_SUCCESS | 退款成功 |
REFUND_PROCESS | 退款处理中 |
REFUND_REJECTED | 退款被拒绝 |
data 字段说明
| 字段名 | 类型 | 说明 |
|---|---|---|
merchantTradeNo | string | 商户交易号 |
productType | string | 创建订单时的 goodsType |
productName | string | 创建订单时的 goodsName |
tradeType | string | 创建订单时的 terminalType |
goodsName | string | 商品名称 |
terminalType | string | 终端类型 |
currency | string | 订单币种 |
orderAmount | string | 订单金额 |
createTime | int64 | 订单创建时间(毫秒) |
transactionId | string | 平台交易 ID |
channelId | string | 客户名称 / 渠道标识 |
refundInfo | object | 退款详情 |
refundInfo 字段
| 字段名 | 类型 | 说明 |
|---|---|---|
refundRequestId | string | 商户退款 ID,由商户生成且小于 32 字节 |
prepayId | string | 拟退款的订单 ID |
orderAmount | string | 订单金额 |
refundAmount | string | 退款金额 |
refundPayCurrency | string | 退款支付币种 |
refundPayAmount | string | 退款支付金额 |
回调示例
退款成功(bizStatus=REFUND_SUCCESS)
退款处理中(bizStatus=REFUND_PROCESS)
退款被拒绝(bizStatus=REFUND_REJECTED)
请求体
application/json

