Table of Contents
10.10 微信退款回调【未执行,需三方/真实联调】
POST /tieup/api/v1/webhooks/refunds/wechat
Content-Type: application/json
请求参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id |
string | 否 | 微信退款回调事件 ID |
resource_type |
string | 否 | 微信退款资源类型 |
resource |
object | 否 | 微信退款加密资源内容 |
resource.ciphertext |
string | 否 | 加密业务载荷 |
resource.nonce |
string | 否 | 加密随机串 |
resource.associated_data |
string | 否 | 附加认证数据 |
查询参数:
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
account_code |
string | 否 | 支付账号代码;多微信商户账号时建议携带,便于验签前定位账号 |
payment_account_id |
integer | 否 | 支付账号 ID;多微信商户账号时可替代 account_code |
请求体示例:
{
"id": "EV-202606170002",
"resource_type": "encrypt-resource",
"resource": {
"ciphertext": "encrypted_refund_payload",
"nonce": "nonce",
"associated_data": "refund"
}
}
响应字段:
| 字段 | 类型 | 说明 |
|---|---|---|
code |
string | 微信回调确认码:SUCCESS=成功,FAIL=失败 |
message |
string | 回调处理结果说明 |
data.ack |
boolean | 业务处理是否确认 |
data.duplicate |
boolean | 是否为重复退款回调 |
data.refund_no |
string | 本地退款单号 |
data.order_no |
string | 本地订单号 |
data.status |
integer | 本地退款状态 |
响应示例:
{
"code": "SUCCESS",
"message": "成功",
"data": {
"ack": true,
"duplicate": false,
"refund_no": "RF202606170001",
"order_no": "TO202606170001",
"status": 3
}
}
说明:
- 由微信支付平台调用,不面向 APP。
- 写入
tieup_payment_notify_log.notify_type = refund,同步tieup_refund_record.status。 - 回调按退款号、第三方退款号或订单号定位退款单;重复成功、失败或关闭回调按幂等处理,不重复累加订单退款金额。
- 退款成功会同步
tieup_order.refund_amount_cent、订单退款状态和tieup_payment_transaction.status = 5。 - 处理失败时返回 HTTP 500,响应体为
{"code":"FAIL","message":"失败原因"}。