Query Payment

URL : /payment/query

Method : POST

Data constraints

{
   "merchant_id" : "[Merchant id]",
   "token" : "[Auth Token]",
   "time" : "[Time Stamp]",
   "platform_order_id" : "[platform order id]"
}

Explainations

param namedescriptionexample
platform_order_idplatform order idTHBP20240401071230HW2xxxxx

Data example

{
  "merchant_id": "AA12345678",
  "token": "testtokentesttokentesttokentesttokentesttoken",
  "time": 1656272222,
  "platform_order_id" : "THBP20240401071230HW2xxxxx"
}

Response

Here are response parameters.

paramdescription
platform_order_ida unique platform order id. You will use this id to identify the order.
merchant_order_idyour merchant order id.
order_datetimeorder datetime
amountamount
statusorder status open settled_paid unsettled_paid error cancelled freeze
expire_datetimeqrcode expire time
payment_datetimepayment datetime

Success Response

Code : 200 OK

Content example

{
    "success": 200,
    "data": {
        "platform_order_id": "THBP2024042821130xxxxxxxxx",
        "merchant_order_id": "ORDER0123456789789445566",
        "order_datetime": "2024-04-28 21:13:09",
        "amount": "1000.0000",
        "status": "open",
        "expire_datetime": "2024-04-28 21:23:09",
        "payment_datetime": null
    }
}

Error Response

Condition : If invalid merchant id, token, or singature

Code : 403 BAD REQUEST

Content :

{
    "error": {
        "code": 403,
        "message": "authentication failed"
    }
}

Condition : If something went wrong.

Code : 500 ERROR

Content :

{
    "error": {
        "code": 500,
        "message": "amount must be greater than 20"
    }
}