10.7 微信支付回调【未执行,需三方/真实联调】

POST /tieup/api/v1/webhooks/payments/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-202606170001",
  "resource_type": "encrypt-resource",
  "resource": {
    "ciphertext": "encrypted_payload",
    "nonce": "nonce",
    "associated_data": "transaction"
  }
}

响应字段:

字段 类型 说明
code string 微信回调确认码:SUCCESS=成功,FAIL=失败
message string 回调处理结果说明
data.ack boolean 业务处理是否确认
data.duplicate boolean 是否为重复支付成功回调
data.order_no string 本地订单号
data.transaction_no string 本地支付流水号
data.delivery object 支付成功后的业务发放结果

响应示例:

{
  "code": "SUCCESS",
  "message": "成功",
  "data": {
    "ack": true,
    "duplicate": false,
    "order_no": "TO202606170001",
    "transaction_no": "TP202606170001",
    "delivery": {
      "delivered": true
    }
  }
}

说明:

  • 由微信支付平台调用,不面向 APP。
  • 写入 tieup_payment_notify_log.notify_type = payment
  • 必须校验签名、金额、订单状态和第三方流水号;重复回调按幂等直接返回成功。
  • 处理失败时返回 HTTP 500,响应体为 {"code":"FAIL","message":"失败原因"}