QuickPay Query API

👍

HTTPS POST / Server-to-Server

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

Go live when you are ready, Live endpoint
is provided.

Query Request


Below are the guidelines that how to prepare a query request and send to 2c2p

  1. Below sample request data show the request structure. Refer QuickPay Query Request Parameter for API Specification.
    Bind the QuickPay Query Request data into QPQueryReq.
{
    "QPQueryReq": {
        "version": "2.1",
        "merchantID": "JT01",
        "qpID": "230969",
        "timeStamp": "20210125043007",
        "hashValue": "0b696b3189f3e364d5f85d3bd2c65b92a2f4d887"
    }
}
  1. Encode the request data using Base64 Format. Below show sample encoded request
ewoJIlFQUXVlcnlSZXEiOiB7CgkJInZlcnNpb24iOiAiMi4xIiwKCQkibWVyY2hhbnRJRCI6ICJKVDAxIiwKCQkicXBJRCI6ICIyMzA5NjkiLAoJCSJ0aW1lU3RhbXAiOiAiMjAyMTAxMjUwNDMwMDciLAoJCSJoYXNoVmFsdWUiOiAiMGI2OTZiMzE4OWYzZTM2NGQ1Zjg1ZDNiZDJjNjViOTJhMmY0ZDg4NyIKCX0KfQ==
  1. Send the encoded request data to API endpoint.

 

Query Response


Below are the guidelines that how to process query response from 2c2p.

  1. QuickPay Query API will return response data in Base64 format. Sample response show below.
eyJRUFF1ZXJ5UmVzIjp7InZlcnNpb24iOiIyLjEiLCJ0aW1lU3RhbXAiOiIyMDIxMDEyNTE1MzIyNSIsInFwSUQiOiIyMzA5NjkiLCJvcmRlcklkUHJlZml4IjoiUVAtMjExMjUzNTczNyIsImRlc2NyaXB0aW9uIjoiVGVzdCIsImN1cnJlbmN5IjoiU0dEIiwiYW1vdW50IjoiMTAwLjAwIiwiYWxsb3dNdWx0aXBsZVBheW1lbnQiOiJOIiwibWF4VHJhbnNhY3Rpb24iOiIxIiwiZXhwaXJ5IjoiMjYwMTIwMjEiLCJ1c2VyRGF0YTEiOiIiLCJ1c2VyRGF0YTIiOiIiLCJ1c2VyRGF0YTMiOiIiLCJ1c2VyRGF0YTQiOiIiLCJ1c2VyRGF0YTUiOiIiLCJwcm9tb3Rpb24iOiIiLCJjYXRlZ29yeUlkIjoiIiwicmVzdWx0VXJsMSI6Imh0dHBzOi8vZGVtbzIuMmMycC5jb20vcGF5bWVudHJlc3VsdC92M3VpZnJvbnRlbmR1cmwuYXNweCIsInJlc3VsdFVybDIiOiJodHRwczovL2RlbW8yLjJjMnAuY29tL3BheW1lbnRyZXN1bHQvdjN1aWJhY2tlbmR1cmwuYXNweCIsInBheW1lbnRPcHRpb24iOiIiLCJpcHBJbnRlcmVzdFR5cGUiOiIiLCJwYXltZW50RXhwaXJ5IjoiIiwidXJsIjoiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS8yQzJQRnJvbnRlbmQvcXAvNzFIUyIsImN1cnJlbnRBcHByb3ZlZCI6IjAiLCJjbGlja0NvdW50IjoiMCIsInJlcXVlc3QzRFMiOiJOIiwiZW5hYmxlU3RvcmVDYXJkIjoiTiIsInJlY3VycmluZyI6Ik4iLCJyZWN1cnJpbmdBbW91bnQiOiIiLCJhbGxvd0FjY3VtdWxhdGUiOiIgIiwibWF4QWNjdW11bGF0ZUFtb3VudCI6IiIsInJlY3VycmluZ0ludGVydmFsIjoiIiwiUmVjdXJyaW5nQ291bnQiOiIiLCJjaGFyZ2VOZXh0RGF0ZSI6IiIsImNoYXJnZU9uRGF0ZSI6IiIsInJlc0NvZGUiOiIwMDAiLCJyZXNEZXNjIjoiU3VjY2VzcyIsImhhc2hWYWx1ZSI6IkY1QTZENTczNEJDMkU3OUMxQ0JBRjgzMjg1QzdDODlFRUQ1RDhDNEIifX0=
  1. Decode the response data using Base64 Format. Below show decoded QuickPay Query 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 QuickPay Query Response data from QPQueryRes. Refer QuickPay Query Response Parameter for API Specification.