# 1.4 QR Code Payment Notification

# Descrption

  • This interface should be implemented by merchant. The function is that when a payment transaction occurs on the merchant's QR Code, Bluepay will call this interface to notify the merchant of the payment transaction details.

# URL

  • Provided by merchant.

# Method

  • POST

# Request Header

Parameter name Required Type of data Description
Content-Type Y string application/json

# Request Params

Parameter name Required Type of data Length Example description
params Y string - - Parameter Body
sign Y string - 45eebd745dcf0b5f6d6f9fcde28cd9fe8116a892 Sign

# param

parameter name required type description
eventName Yes string event name( qrcode.payment.successqrcode.payment.failed
mchOrderId Yes string mchOrderId, alphanumeric, max length 32
transactionId Yes string Bluepay transaction ID
amount integer amount (unit: cents)
fee integer fee (unit: cents)
totalAmount integer totalAmount(qrCode amount, unit: cents)
transactionStatus Yes string transaction status(PENDINGCOMPLETEDFAILED
createTime Yes string payment create time
returnTime Yes string payment finish time
channelCode Yes string channel code
remark Yes string remark
failedCode No integer Failed Code
failedMessage No string Failed Message

# Response parameters

paramter name type description
code integer Response code, fixed value 10000
message string Response message, fixed value Success

# Request example

# Param content

{
  "channelCode": "THAI_DYNAMIC_QR",
  "mchOrderId": "8880001",
  "transactionId": "QR123456789",
  "amount": 2300,
  "fee": 200,
  "totalAmount": 2500,
  "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": "{\"channelCode\":\"THAI_DYNAMIC_QR\",\"mchOrderId\":\"8880001\",\"transactionId\":\"QR123456789\",\"amount\":2300,\"fee\":200,\"totalAmount\":2500,\"transactionStatus\":\"COMPLETED\",\"createTime\":\"2022-11-28 22:10:10\",\"returnTime\":\"2022-11-28 22:11:00\",\"remark\":\"example\"}"
}

# Response example

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