QuickPay Generate Link API
HTTPS POST / Server-to-Server
QuickPay requests and responses are encoded using Base64. Merchant required to:
- Encode the QuickPay request
- Decode the QuickPay response
https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DirectAPI
https://t.2c2p.com/QuickPay/DirectAPI
API Parameter
Generate Link Request Parameters
Generate Link Response Parameters
Generate Link Request
- Prepare an API request to generate a QuickPay link.
- Bind the request data into GenerateQPReq.
- Encode the request data in Base64 format.
{
"GenerateQPReq": {
"version": "2.4",
"merchantID": "JT01",
"orderIdPrefix": "QP-2112535739",
"description": "Test",
"amount": "100.00",
"currency": "SGD",
"allowMultiplePayment": "N",
"maxTransaction": "",
"expiry": "2024-12-31 23:59:59",
"categoryId": "",
"promotion": "",
"paymentOption": "",
"ippInterestType": "",
"paymentExpiry": "",
"request3DS": "N",
"enableStoreCard": "N",
"recurring": "N",
"recurringAmount": "",
"allowAccumulate": "",
"maxAccumulateAmount": "",
"recurringInterval": "",
"recurringCount": "",
"chargeNextDate": "",
"chargeOnDate": "",
"useStoreCardOnly": "N",
"storeCardUniqueID": "",
"ippPeriodFilter": "",
"locale": "",
"userData1": "",
"userData2": "",
"userData3": "",
"userData4": "",
"userData5": "",
"resultUrl1": "https://demo2.2c2p.com/paymentresult/v3uifrontendurl.aspx",
"resultUrl2": "https://demo2.2c2p.com/paymentresult/v3uibackendurl.aspx",
"timeStamp": "20210125040647",
"hashValue": "2fb533d5f6f0a473538f76ac070346797294bce7"
}
}
ewoJIkdlbmVyYXRlUVBSZXEiOiB7CgkJInZlcnNpb24iOiAiMi40IiwKCQkibWVyY2hhbnRJRCI6ICJKVDAxIiwKCQkib3JkZXJJZFByZWZpeCI6ICJRUC0yMTEyNTM1NzM5IiwKCQkiZGVzY3JpcHRpb24iOiAiVGVzdCIsCgkJImFtb3VudCI6ICIxMDAuMDAiLAoJCSJjdXJyZW5jeSI6ICJTR0QiLAoJCSJhbGxvd011bHRpcGxlUGF5bWVudCI6ICJOIiwKCQkibWF4VHJhbnNhY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wYTQ3MzUzOGY3NmFjMDcwMzQ2Nzk3Mjk0YmNlNyIKCX0KfQ==
- Send the encoded request to the API endpoint.
curl --location --request POST 'https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DirectAPI' \
--header 'Content-Type: text/plain' \
--data-raw 'ewoJIkdlbmVyYXRlUVBSZXEiOiB7CgkJInZlcnNpb24iOiAiMi40IiwKCQkibWVyY2hhbnRJRCI6ICJKVDAxIiwKCQkib3JkZXJJZFByZWZpeCI6ICJRUC0yMTEyNTM1NzM5IiwKCQkiZGVzY3JpcHRpb24iOiAiVGVzdCIsCgkJImFtb3VudCI6ICIxMDAuMDAiLAoJCSJjdXJyZW5jeSI6ICJTR0QiLAoJCSJhbGxvd011bHRpcGxlUGF5bWVudCI6ICJOIiwKCQkibWF4VHJhbnNhY3Rpb24iOiAiIiwKCQkiZXhwaXJ5IjogIjIwMjQtMTItMzEgMjM6NTk6NTkiLAoJCSJjYXRlZ29yeUlkIjogIiIsCgkJInByb21vdGlvbiI6ICIiLAoJCSJwYXltZW50T3B0aW9uIjogIiIsCgkJImlwcEludGVyZXN0VHlwZSI6ICIiLAoJCSJwYXltZW50RXhwaXJ5IjogIiIsCgkJInJlcXVlc3QzRFMiOiAiTiIsCgkJImVuYWJsZVN0b3JlQ2FyZCI6ICJOIiwKCQkicmVjdXJyaW5nIjogIk4iLAoJCSJyZWN1cnJpbmdBbW91bnQiOiAiIiwKCQkiYWxsb3dBY2N1bXVsYXRlIjogIiIsCgkJIm1heEFjY3VtdWxhdGVBbW91bnQiOiAiIiwKCQkicmVjdXJyaW5nSW50ZXJ2YWwiOiAiIiwKCQkicmVjdXJyaW5nQ291bnQiOiAiIiwKCQkiY2hhcmdlTmV4dERhdGUiOiAiIiwKCQkiY2hhcmdlT25EYXRlIjogIiIsCgkJInVzZVN0b3JlQ2FyZE9ubHkiOiAiTiIsCgkJInN0b3JlQ2FyZFVuaXF1ZUlEIjogIiIsCgkJImlwcFBlcmlvZEZpbHRlciI6ICIiLAoJCSJsb2NhbGUiOiAiIiwKCQkidXNlckRhdGExIjogIiIsCgkJInVzZXJEYXRhMiI6ICIiLAoJCSJ1c2VyRGF0YTMiOiAiIiwKCQkidXNlckRhdGE0IjogIiIsCgkJInVzZXJEYXRhNSI6ICIiLAoJCSJyZXN1bHRVcmwxIjogImh0dHBzOi8vZGVtbzIuMmMycC5jb20vcGF5bWVudHJlc3VsdC92M3VpZnJvbnRlbmR1cmwuYXNweCIsCgkJInJlc3VsdFVybDIiOiAiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS9wYXltZW50cmVzdWx0L3YzdWliYWNrZW5kdXJsLmFzcHgiLAoJCSJ0aW1lU3RhbXAiOiAiMjAyMTAxMjUwNDA2NDciLAoJCSJoYXNoVmFsdWUiOiAiMmZiNTMzZDVmNmYwYTQ3MzUzOGY3NmFjMDcwMzQ2Nzk3Mjk0YmNlNyIKCX0KfQ=='
Generate Link Response
- Process a response from the Generate Link API. Note that the API will return response data in Base64 format.
- Decode the response data.
- Read the API response data from GenerateQPRes.
{
"GenerateQPRes": {
"version": "2.4",
"timeStamp": "20210125150720",
"qpID": "230970",
"orderIdPrefix": "QP-2112535739",
"currency": "SGD",
"amount": "100.00",
"expiry": "2024-12-31 23:59:59",
"url": "https://demo2.2c2p.com/2C2PFrontend/qp/71HT",
"resCode": "000",
"resDesc": "Success",
"hashValue": "7026E2C396D462EBB69D2E952F7C434690DBE1C1"
}
}
ewoJIkdlbmVyYXRlUVBSZXMiOiB7CgkJInZlcnNpb24iOiAiMi40IiwKCQkidGltZVN0YW1wIjogIjIwMjEwMTI1MTUwNzIwIiwKCQkicXBJRCI6ICIyMzA5NzAiLAoJCSJvcmRlcklkUHJlZml4IjogIlFQLTIxMTI1MzU3MzkiLAoJCSJjdXJyZW5jeSI6ICJTR0QiLAoJCSJhbW91bnQiOiAiMTAwLjAwIiwKCQkiZXhwaXJ5IjogIjIwMjQtMTItMzEgMjM6NTk6NTkiLAoJCSJ1cmwiOiAiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS8yQzJQRnJvbnRlbmQvcXAvNzFIVCIsCgkJInJlc0NvZGUiOiAiMDAwIiwKCQkicmVzRGVzYyI6ICJTdWNjZXNzIiwKCQkiaGFzaFZhbHVlIjogIjcwMjZFMkMzOTZENDYyRUJCNjlEMkU5NTJGN0M0MzQ2OTBEQkUxQzEiCgl9Cn0=
Updated almost 2 years ago