QuickPay Update API

👍

HTTPS POST / Server-to-Server

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

To go live, please refer to: Live endpoint guide

Update Request


  1. To prepare an API request to update QuickPay data, refer to the sample request structure below.

For specific API request parameters, refer to: QuickPay Update Request Parameter

{
    "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"
    }
}
  1. Bind the QuickPay Update Request data into QPUpdateReq.

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

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

 

Update Response


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

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