These docs are for v4.0.2. Click to read the latest docs for v4.3.0.

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


  1. Prepare an API request to generate a QuickPay link.
  2. Bind the request data into GenerateQPReq.
  3. Encode the request data in Base64 format.
{
	"GenerateQPReq": {
		"version": "2.1",
		"merchantID": "JT01",
		"orderIdPrefix": "QP-2112535739",
		"description": "Test",
		"amount": "100.00",
		"currency": "SGD",
		"allowMultiplePayment": "N",
		"maxTransaction": "",
		"expiry": "26012021",
		"categoryId": "",
		"promotion": "",
		"paymentOption": "",
		"ippInterestType": "",
		"paymentExpiry": "",
		"request3DS": "N",
		"enableStoreCard": "N",
		"recurring": "N",
		"recurringAmount": "",
		"allowAccumulate": "",
		"maxAccumulateAmount": "",
		"recurringInterval": "",
		"recurringCount": "",
		"chargeNextDate": "",
		"chargeOnDate": "",
		"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"
	}
}
ewoJIkdlbmVyYXRlUVBSZXEiOiB7CgkJInZlcnNpb24iOiAiMi4xIiwKCQkibWVyY2hhbnRJRCI6ICJKVDAxIiwKCQkib3JkZXJJZFByZWZpeCI6ICJRUC0yMTEyNTM1NzM5IiwKCQkiZGVzY3JpcHRpb24iOiAiVGVzdCIsCgkJImFtb3VudCI6ICIxMDAuMDAiLAoJCSJjdXJyZW5jeSI6ICJTR0QiLAoJCSJhbGxvd011bHRpcGxlUGF5bWVudCI6ICJOIiwKCQkibWF4VHJhbnNhY3Rpb24iOiAiIiwKCQkiZXhwaXJ5IjogIjI2MDEyMDIxIiwKCQkiY2F0ZWdvcnlJZCI6ICIiLAoJCSJwcm9tb3Rpb24iOiAiIiwKCQkicGF5bWVudE9wdGlvbiI6ICIiLAoJCSJpcHBJbnRlcmVzdFR5cGUiOiAiIiwKCQkicGF5bWVudEV4cGlyeSI6ICIiLAoJCSJyZXF1ZXN0M0RTIjogIk4iLAoJCSJlbmFibGVTdG9yZUNhcmQiOiAiTiIsCgkJInJlY3VycmluZyI6ICJOIiwKCQkicmVjdXJyaW5nQW1vdW50IjogIiIsCgkJImFsbG93QWNjdW11bGF0ZSI6ICIiLAoJCSJtYXhBY2N1bXVsYXRlQW1vdW50IjogIiIsCgkJInJlY3VycmluZ0ludGVydmFsIjogIiIsCgkJInJlY3VycmluZ0NvdW50IjogIiIsCgkJImNoYXJnZU5leHREYXRlIjogIiIsCgkJImNoYXJnZU9uRGF0ZSI6ICIiLAoJCSJ1c2VyRGF0YTEiOiAiIiwKCQkidXNlckRhdGEyIjogIiIsCgkJInVzZXJEYXRhMyI6ICIiLAoJCSJ1c2VyRGF0YTQiOiAiIiwKCQkidXNlckRhdGE1IjogIiIsCgkJInJlc3VsdFVybDEiOiAiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS9wYXltZW50cmVzdWx0L3YzdWlmcm9udGVuZHVybC5hc3B4IiwKCQkicmVzdWx0VXJsMiI6ICJodHRwczovL2RlbW8yLjJjMnAuY29tL3BheW1lbnRyZXN1bHQvdjN1aWJhY2tlbmR1cmwuYXNweCIsCgkJInRpbWVTdGFtcCI6ICIyMDIxMDEyNTA0MDY0NyIsCgkJImhhc2hWYWx1ZSI6ICIyZmI1MzNkNWY2ZjBhNDczNTM4Zjc2YWMwNzAzNDY3OTcyOTRiY2U3IgoJfQp9
  1. Send the encoded request to the API endpoint.
curl --location --request POST 'https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DirectAPI' \
--header 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ICJodHRwczovL2RlbW8yLjJjMnAuY29tL3BheW1lbnRyZXN1bHQvdjN1aWJhY2tlbmR1cmwuYXNweCIsCgkJInRpbWVTdGFtcCI6ICIyMDIxMDEyNTA0MDY0NyIsCgkJImhhc2hWYWx1ZSI6ICIyZmI1MzNkNWY2ZjBhNDczNTM4Zjc2YWMwNzAzNDY3OTcyOTRiY2U3IgoJfQp9
'

 

Generate Link Response


  1. Process a response from the Generate Link API. Note that the API will return response data in Base64 format.
  2. Decode the response data.
  3. Read the API response data from GenerateQPRes.
{
	"GenerateQPRes": {
		"version": "2.1",
		"timeStamp": "20210125150720",
		"qpID": "230970",
		"orderIdPrefix": "QP-2112535739",
		"currency": "SGD",
		"amount": "100.00",
		"expiry": "26012021",
		"url": "https://demo2.2c2p.com/2C2PFrontend/qp/71HT",
		"resCode": "000",
		"resDesc": "Success",
		"hashValue": "7026E2C396D462EBB69D2E952F7C434690DBE1C1"
	}
}
eyJHZW5lcmF0ZVFQUmVzIjp7InZlcnNpb24iOiIyLjEiLCJ0aW1lU3RhbXAiOiIyMDIxMDEyNTE1MDcyMCIsInFwSUQiOiIyMzA5NzAiLCJvcmRlcklkUHJlZml4IjoiUVAtMjExMjUzNTczOSIsImN1cnJlbmN5IjoiU0dEIiwiYW1vdW50IjoiMTAwLjAwIiwiZXhwaXJ5IjoiMjYwMTIwMjEiLCJ1cmwiOiJodHRwczovL2RlbW8yLjJjMnAuY29tLzJDMlBGcm9udGVuZC9xcC83MUhUIiwicmVzQ29kZSI6IjAwMCIsInJlc0Rlc2MiOiJTdWNjZXNzIiwiaGFzaFZhbHVlIjoiNzAyNkUyQzM5NkQ0NjJFQkI2OUQyRTk1MkY3QzQzNDY5MERCRTFDMSJ9fQ==