# 3. WebPay Payment Notification
# Descrption
This interface should be implemented by merchant. The function is that when a payment transaction occurs on the merchant's pay url, BluePay will call this interface to notify the merchant of the payment transaction details.
# HTTP request info
# URL
Provided by merchant.
# Method
POST
# Content-Type
application/json
# Request parameters
parameter name | required | type | description |
---|---|---|---|
eventName | Yes | string | event name ( order.payment.success , order.payment.failed ) |
mchOrderId | Yes | string | merchant order ID, alphanumeric, max length 32 |
transactionId | Yes | string | BluePay transaction ID |
amount | Yes | integer | amount |
transactionStatus | Yes | string | transaction status(PENDING , COMPLETED , FAILED ) |
createTime | Yes | string | payment create time |
returnTime | Yes | string | payment finish time |
channelCode | Yes | string | channel code, refer to WebPay Channel List |
remark | Yes | string | remark |
# Response parameters
parameter name | type | description |
---|---|---|
code | integer | Response code, fixed value 10000 |
message | string | Response message, fixed value Success |
# Request example
# Param content
{
"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"
}
How BluePay construct request body
# Request body
{
"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\"}"
}
# Response example
{
"code": 10000,
"message": "Success"
}