# 3. WebPay回调通知

# 说明

该接口由商户实现,作用是在商户通过支付链接完成支付时,BluePay 会调用此接口将交易详情通知给商户。

# HTTP请求信息

# URL

由商户提供

# 请求方式

POST

# Content-Type

application/json

# 请求参数

参数名 是否必填 类型 说明
eventName string 事件名称( order.payment.successorder.payment.failed
mchOrderId string 商户订单号
transactionId string BluePay 流水号
amount integer 金额
transactionStatus string 交易状态(PENDINGCOMPLETEDFAILED
createTime string 交易创建时间
returnTime string 交易完成时间
channelCode string 渠道码,参考WebPay渠道码列表
remark string 备注

# 响应参数

参数名 类型 说明
code integer 响应码,固定为 10000
message string 响应消息,固定为 Success

# 请求示例

# param 内容

{
  "eventName": "order.payment.success",
  "mchOrderId": "mchOrderId123",
  "channelCode": "WECHAT_URL",
  "transactionId": "C123456789xx",
  "amount": 2300,
  "transactionStatus": "COMPLETED",
  "createTime": "2022-11-28 22:10:10",
  "returnTime": "2022-11-28 22:11:00",
  "remark": "example"
}

BluePay 如何构造请求体

# 请求体

{
    "sign": "V6HQvEZaLF5MSH8TcOVdqPj7fLyvdrAOPm74rW9svpclBIVPlokyiZqPXl09/yAOS8PNnganUtvRvie9MAxJwtYOkDMXxxi4gWjPl3D9L6W4fnVeC28HjhZhWrSgwlecJG6SuHM3odTHAxr5WQUuOxsYFtx+c74Ew+ZzuICCH3dA4+uzNEbDyB8QmBF94nM1LFhDId/VEMxdbj8xKJuOMiSBgwAWaFElm5YCfgmrZpU/qLnuGX2hNxQAMKY2GAw+4VpphYpHG8Xak5+PlqFWKp8mKJ9DgyphVf0ACGpcjOQp0S1V+S1HMMVU0AkW6c8n0weOMu3l6k6cPHsjEe/jSQ==",
    "param": "{\"eventName\":\"order.payment.success\",\"mchOrderId\":\"mchOrderId123\",\"channelCode\":\"WECHAT_URL\",\"transactionId\":\"C123456789xx\",\"amount\":2300,\"transactionStatus\":\"COMPLETED\",\"createTime\":\"2022-11-28 22:10:10\",\"returnTime\":\"2022-11-28 22:11:00\",\"remark\":\"example\"}"
}

# 返回示例

{
    "code": 10000,
    "message": "Success"
}