QuickPay Query API

👍

HTTPS POST / Server-to-Server

Sandbox endpoint : demo2.2c2p.com/2C2PFrontEnd/QuickPay/DirectAPI

To go live, please refer to: Live endpoint guide

Generate Query Request


  1. To prepare a Query API request to inquire about QuickPay data, refer to the sample request structure below.

For specific API request parameters, refer to: QuickPay Query Request Parameters

{
    "QPQueryReq": {
        "version": "2.1",
        "merchantID": "JT01",
        "qpID": "230969",
        "timeStamp": "20210125043007",
        "hashValue": "0b696b3189f3e364d5f85d3bd2c65b92a2f4d887"
    }
}
  1. Bind the QuickPay Query Request data into QPQueryReq.

Encode the request data in Base64 format. The sample code below demonstrates correctly encoded request data.

ewoJIlFQUXVlcnlSZXEiOiB7CgkJInZlcnNpb24iOiAiMi4xIiwKCQkibWVyY2hhbnRJRCI6ICJKVDAxIiwKCQkicXBJRCI6ICIyMzA5NjkiLAoJCSJ0aW1lU3RhbXAiOiAiMjAyMTAxMjUwNDMwMDciLAoJCSJoYXNoVmFsdWUiOiAiMGI2OTZiMzE4OWYzZTM2NGQ1Zjg1ZDNiZDJjNjViOTJhMmY0ZDg4NyIKCX0KfQ==
  1. Send the encoded request to the API endpoint.

 

Query Response


  1. To process a response from the Query API, refer to the sample response below. Note that the API will return response data in Base64 format.
eyJRUFF1ZXJ5UmVzIjp7InZlcnNpb24iOiIyLjEiLCJ0aW1lU3RhbXAiOiIyMDIxMDEyNTE1MzIyNSIsInFwSUQiOiIyMzA5NjkiLCJvcmRlcklkUHJlZml4IjoiUVAtMjExMjUzNTczNyIsImRlc2NyaXB0aW9uIjoiVGVzdCIsImN1cnJlbmN5IjoiU0dEIiwiYW1vdW50IjoiMTAwLjAwIiwiYWxsb3dNdWx0aXBsZVBheW1lbnQiOiJOIiwibWF4VHJhbnNhY3Rpb24iOiIxIiwiZXhwaXJ5IjoiMjYwMTIwMjEiLCJ1c2VyRGF0YTEiOiIiLCJ1c2VyRGF0YTIiOiIiLCJ1c2VyRGF0YTMiOiIiLCJ1c2VyRGF0YTQiOiIiLCJ1c2VyRGF0YTUiOiIiLCJwcm9tb3Rpb24iOiIiLCJjYXRlZ29yeUlkIjoiIiwicmVzdWx0VXJsMSI6Imh0dHBzOi8vZGVtbzIuMmMycC5jb20vcGF5bWVudHJlc3VsdC92M3VpZnJvbnRlbmR1cmwuYXNweCIsInJlc3VsdFVybDIiOiJodHRwczovL2RlbW8yLjJjMnAuY29tL3BheW1lbnRyZXN1bHQvdjN1aWJhY2tlbmR1cmwuYXNweCIsInBheW1lbnRPcHRpb24iOiIiLCJpcHBJbnRlcmVzdFR5cGUiOiIiLCJwYXltZW50RXhwaXJ5IjoiIiwidXJsIjoiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS8yQzJQRnJvbnRlbmQvcXAvNzFIUyIsImN1cnJlbnRBcHByb3ZlZCI6IjAiLCJjbGlja0NvdW50IjoiMCIsInJlcXVlc3QzRFMiOiJOIiwiZW5hYmxlU3RvcmVDYXJkIjoiTiIsInJlY3VycmluZyI6Ik4iLCJyZWN1cnJpbmdBbW91bnQiOiIiLCJhbGxvd0FjY3VtdWxhdGUiOiIgIiwibWF4QWNjdW11bGF0ZUFtb3VudCI6IiIsInJlY3VycmluZ0ludGVydmFsIjoiIiwiUmVjdXJyaW5nQ291bnQiOiIiLCJjaGFyZ2VOZXh0RGF0ZSI6IiIsImNoYXJnZU9uRGF0ZSI6IiIsInJlc0NvZGUiOiIwMDAiLCJyZXNEZXNjIjoiU3VjY2VzcyIsImhhc2hWYWx1ZSI6IkY1QTZENTczNEJDMkU3OUMxQ0JBRjgzMjg1QzdDODlFRUQ1RDhDNEIifX0=
  1. Decode the response data. The sample code below demonstrates correctly decoded API response data.
{
    "QPQueryRes": {
        "version": "2.1",
        "timeStamp": "20210125153225",
        "qpID": "230969",
        "orderIdPrefix": "QP-2112535737",
        "description": "Test",
        "currency": "SGD",
        "amount": "100.00",
        "allowMultiplePayment": "N",
        "maxTransaction": "1",
        "expiry": "26012021",
        "userData1": "",
        "userData2": "",
        "userData3": "",
        "userData4": "",
        "userData5": "",
        "promotion": "",
        "categoryId": "",
        "resultUrl1": "https://demo2.2c2p.com/paymentresult/v3uifrontendurl.aspx",
        "resultUrl2": "https://demo2.2c2p.com/paymentresult/v3uibackendurl.aspx",
        "paymentOption": "",
        "ippInterestType": "",
        "paymentExpiry": "",
        "url": "https://demo2.2c2p.com/2C2PFrontend/qp/71HS",
        "currentApproved": "0",
        "clickCount": "0",
        "request3DS": "N",
        "enableStoreCard": "N",
        "recurring": "N",
        "recurringAmount": "",
        "allowAccumulate": " ",
        "maxAccumulateAmount": "",
        "recurringInterval": "",
        "RecurringCount": "",
        "chargeNextDate": "",
        "chargeOnDate": "",
        "resCode": "000",
        "resDesc": "Success",
        "hashValue": "F5A6D5734BC2E79C1CBAF83285C7C89EED5D8C4B"
    }
}
    1. Read the API response data from QPQueryRes.

For specific API response parameters, refer to: QuickPay Query Response Parameter