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

QuickPay Update API

👍

HTTPS POST / Server-to-Server

QuickPay Update requests and responses are encoded using Base64. Merchant required to:

  • Encode the QuickPay Update request
  • Decode the QuickPay Update response
https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DirectAPI
https://t.2c2p.com/QuickPay/DirectAPI

📘

API Parameter

QuickPay Update Request Parameter
QuickPay Update Response Parameter

Update Request


  1. Prepare an API request to update QuickPay data.
  2. Bind the QuickPay Update Request data into QPUpdateReq.

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

{
	"QPUpdateReq": {
		"version": "2.1",
		"merchantID": "JT01",
		"qpID": "230969",
		"description": " Test 123",
		"amount": "200.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": "20210125050635",
		"hashValue": "043a24a8d5c308cf4cbe7ee617d35113278248de"
	}
}
ewoJIlFQVXBkYXRlUmVxIjogewoJCSJ2ZXJzaW9uIjogIjIuMSIsCgkJIm1lcmNoYW50SUQiOiAiSlQwMSIsCgkJInFwSUQiOiAiMjMwOTY5IiwKCQkiZGVzY3JpcHRpb24iOiAiIFRlc3QgMTIzIiwKCQkiYW1vdW50IjogIjIwMC4wMCIsCgkJImN1cnJlbmN5IjogIlNHRCIsCgkJImFsbG93TXVsdGlwbGVQYXltZW50IjogIk4iLAoJCSJtYXhUcmFuc2FjdGlvbiI6ICIiLAoJCSJleHBpcnkiOiAiMjYwMTIwMjEiLAoJCSJjYXRlZ29yeUlkIjogIiIsCgkJInByb21vdGlvbiI6ICIiLAoJCSJwYXltZW50T3B0aW9uIjogIiIsCgkJImlwcEludGVyZXN0VHlwZSI6ICIiLAoJCSJwYXltZW50RXhwaXJ5IjogIiIsCgkJInJlcXVlc3QzRFMiOiAiTiIsCgkJImVuYWJsZVN0b3JlQ2FyZCI6ICJOIiwKCQkicmVjdXJyaW5nIjogIk4iLAoJCSJyZWN1cnJpbmdBbW91bnQiOiAiIiwKCQkiYWxsb3dBY2N1bXVsYXRlIjogIiIsCgkJIm1heEFjY3VtdWxhdGVBbW91bnQiOiAiIiwKCQkicmVjdXJyaW5nSW50ZXJ2YWwiOiAiIiwKCQkicmVjdXJyaW5nQ291bnQiOiAiIiwKCQkiY2hhcmdlTmV4dERhdGUiOiAiIiwKCQkiY2hhcmdlT25EYXRlIjogIiIsCgkJInVzZXJEYXRhMSI6ICIiLAoJCSJ1c2VyRGF0YTIiOiAiIiwKCQkidXNlckRhdGEzIjogIiIsCgkJInVzZXJEYXRhNCI6ICIiLAoJCSJ1c2VyRGF0YTUiOiAiIiwKCQkicmVzdWx0VXJsMSI6ICJodHRwczovL2RlbW8yLjJjMnAuY29tL3BheW1lbnRyZXN1bHQvdjN1aWZyb250ZW5kdXJsLmFzcHgiLAoJCSJyZXN1bHRVcmwyIjogImh0dHBzOi8vZGVtbzIuMmMycC5jb20vcGF5bWVudHJlc3VsdC92M3VpYmFja2VuZHVybC5hc3B4IiwKCQkidGltZVN0YW1wIjogIjIwMjEwMTI1MDUwNjM1IiwKCQkiaGFzaFZhbHVlIjogIjA0M2EyNGE4ZDVjMzA4Y2Y0Y2JlN2VlNjE3ZDM1MTEzMjc4MjQ4ZGUiCgl9Cn0=
  1. Send the encoded request to the API endpoint.
curl --location --request POST 'https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DirectAP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8vZGVtbzIuMmMycC5jb20vcGF5bWVudHJlc3VsdC92M3VpYmFja2VuZHVybC5hc3B4IiwKCQkidGltZVN0YW1wIjogIjIwMjEwMTI1MDUwNjM1IiwKCQkiaGFzaFZhbHVlIjogIjA0M2EyNGE4ZDVjMzA4Y2Y0Y2JlN2VlNjE3ZDM1MTEzMjc4MjQ4ZGUiCgl9Cn0='

 

Update Response


  1. Process a response from the Update API. Note that the API will return response data in Base64 format.
  2. Decode the response data. The sample code below demonstrates correctly decoded API response data.
  3. Read the API Response data from QPUpdateRes.
{
	"QPUpdateRes": {
		"version": "2.1",
		"timeStamp": "20210125160820",
		"qpID": "230969",
		"resCode": "000",
		"resDesc": "Success",
		"hashValue": "01F90B22B44E6765962C06E09D8072AAF1E09661"
	}
}
eyJRUFVwZGF0ZVJlcyI6eyJ2ZXJzaW9uIjoiMi4xIiwidGltZVN0YW1wIjoiMjAyMTAxMjUxNjA4MjAiLCJxcElEIjoiMjMwOTY5IiwicmVzQ29kZSI6IjAwMCIsInJlc0Rlc2MiOiJTdWNjZXNzIiwiaGFzaFZhbHVlIjoiMDFGOTBCMjJCNDRFNjc2NTk2MkMwNkUwOUQ4MDcyQUFGMUUwOTY2MSJ9fQ==