Skip to main content

Query a direct order

Use this endpoint to retrieve the current status and details of a specific Direct Model order.

Endpoint summary

Path: /direct/query
Method: POST
Content-Type: application/json

Request parameters

ParameterTypeMandatoryDescription
merchantIdStringMMerchant identifier
orderIdNumberCOrder ID of the payment. Mandatory when merchantReference is not given
merchantReferenceString(64)CUnique reference of the order. Mandatory when orderId is not given

Request example

{
"request": "{\"merchantId\":\"3000001\",\"merchantReference\":\"s22tring\"}",
"signature":"c1hTR2RBNHRSNEIwd25GNk5yOFNocGZOTXRISVNXdXpMcGRLb05Xc2tJZ0Njc3BNVkZGemdrZXo0QnJtdFlYa01xWmgxdHl6LzhzTk5VM0YyVlR1MGZPeCtaUDRDbm1Wak51OGJjaXU0aFR0bnl0QTNZMUdaL3lYQVVEK21WWUdYZXlETzNmSHJxRGRJN2szeFYvUThGQ09kMGN1bFRzTjZSUk14TVpxK29xUjJ4K0VqT1hWb2ZwN0JaSndoUUU4VXM0QWw1NzNGUXo1RUhEdkNMeDM1bHEyaG9NaFhMQ1ZMVkRCSGNwQ2dvdHVZNG1nOTFNWGgvcXFjRkdZL2hRS2hHZFdBYlo5dGNwMlE1czJFU2gzN3JxeG5Pd1pycmVwSzhOQzZ2TUJQVWlTUHhRZWZwZXYybkcwSnpBSE9qUlBiQlhZdzFYQlM2UkJZS0FtdWZaWmlRPT0="
}

Response parameters

ParameterTypeMandatoryDescription
responseCodeStringMPayment Gateway response code
messageStringMPayment Gateway response message
orderObjectM 
order.idNumberMOrder identifier
order.merchantIdNumberMMerchant identifier which own this order
order.merchantReferenceStringMYour reference for the order
order.currencyStringM3-Letters ISO currency code of the order
order.amountNumberMOrder amount
order.netAmountNumberMNet amount of the order
order.cardTypeStringMCard type of the order
order.createTimeDatetimeMTimestamp when the order is created. Maintained by the Payment Gateway
order.updateTimeDatetimeMTimestamp when the order is last updated. Maintained by the Payment Gateway
order.statusStringMStatus of the order. Maintained by the Payment Gateway
order.recurringBooleanMFlags the order is a recurring order or not
note
  • Use this endpoint to poll for the final order status after initiating a payment.

Response example

{
"responseCode": "0000",
"message": "SUCCESS",
"order":{
"id": "1076",
"merchantId": 3000001,
"merchantReference": "reference003589",
"currency": "HKD",
"amount": 76.19,
"netAmount": 76.19,
"cardType": "VISA",
"email": "",
"createTime": "2022-03-04T04:24:18.000+00:00",
"updateTime": "2022-03-04T04:27:01.000+00:00",
"status": "SUCCESS",
"recurring": false
}
}