QuickPay Generate and Send Link API
HTTPS POST / Server-to-Server
QuickPay Generate and Send Link requests and responses are encoded using Base64. Merchant required to:
- Encode the QuickPay Generate and Send Link request
- Decode the QuickPay Generate and Send Link response
https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DeliveryAPI
https://t.2c2p.com/QuickPay/DeliveryAPI
API Parameter
Generate and Send Link Request Parameter
Generate and Send Link Response Parameters
Generate and Send Link Request
- Prepare an API request to generate and send a QuickPay link.
- Bind the Generate Link Request data into GenerateSendQPReq.
Encode the request data in Base64 format. The sample code below demonstrates correctly encoded request data.
{
"GenerateSendQPReq": {
"version": "2.1",
"merchantID": "JT01",
"orderIdPrefix": "QP-21126102038",
"description": "V3 Test",
"amount": "100.00",
"currency": "SGD",
"allowMultiplePayment": "N",
"maxTransaction": "",
"expiry": "27012021",
"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",
"toEmails": "[email protected]",
"ccEmails": "",
"bccEmails": "[email protected]",
"emailSubject": "Promotion! Last chance to buy now!",
"emailMessage": "Please make payment.",
"toMobiles": "+6599999999",
"smsMessage": "Make payment by DEC 2021",
"resultUrl2": "https://demo2.2c2p.com/paymentresult/v3uibackendurl.aspx",
"timeStamp": "20210126104326",
"hashValue": "a18aaaf276fc1e7b5d3221844a16d15cf9601067"
}
}
ewoJIkdlbmVyYXRlU2VuZFFQUmVxIjogewoJCSJ2ZXJzaW9uIjogIjIuMSIsCgkJIm1lcmNoYW50SUQiOiAiSlQwNyIsCgkJIm9yZGVySWRQcmVmaXgiOiAiUVAtMjExMjYxMDIwMzUiLAoJ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FuY2UgdG8gYnV5IG5vdyEiLAoJCSJlbWFpbE1lc3NhZ2UiOiAiUGxlYXNlIG1ha2UgcGF5bWVudC4iLAoJCSJ0b01vYmlsZXMiOiAiKzY1OTk5OTk5OTkiLAoJCSJzbXNNZXNzYWdlIjogIk1ha2UgcGF5bWVudCBieSBERUMgMjAyMSIsCgkJInJlc3VsdFVybDIiOiAiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS9wYXltZW50cmVzdWx0L3YzdWliYWNrZW5kdXJsLmFzcHgiLAoJCSJ0aW1lU3RhbXAiOiAiMjAyMTAxMjYxMDIxMzIiLAoJCSJoYXNoVmFsdWUiOiAiNTljYjQ1MDM5MDgxNmY1YTIzNjljODdhMzU4NTE0NzY4NmVkNzNlYyIKCX0KfQ==
- Send the encoded request data to the API endpoint.
curl --location --request POST 'https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DeliveryAPI' \
--header 'Content-Type: text/plain' \
--data-raw 'ewoJIkdlbmVyYXRlU2VuZFFQUmVxIjogewoJCSJ2ZXJzaW9uIjogIjIuMSIsCgkJIm1lcmNoYW50SUQiOiAiSlQwNyIsCgkJIm9yZGVySWRQcmVmaXgiOiAiUVAtMjExMjYxMDIwMzUiLAoJCSJkZXNjcmlwdGlvbiI6ICJWMyBUZXN0IiwKCQkiYW1vdW50IjogIjEwMC4wMCIsCgkJImN1cnJlbmN5IjogIlNHRCIsCgkJImFsbG93TXVsdGlwbGVQYXltZW50IjogIk4iLAoJCSJtYXhUcmFuc2FjdGlvbiI6ICIiLAoJCSJleHBpcnkiOiAiMjcwMTIwMjEiLAoJCSJjYXRlZ29yeUlkIjogIiIsCgkJInByb21vdGlvbiI6ICIiLAoJCSJwYXltZW50T3B0aW9uIjogIiIsCgkJImlwcEludGVyZXN0VHlwZSI6ICIiLAoJCSJwYXltZW50RXhwaXJ5IjogIiIsCgkJInJlcXVlc3QzRFMiOiAiTiIsCgkJImVuYWJsZVN0b3JlQ2FyZCI6ICJOIiwKCQkic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YyIKCX0KfQ=='
Generate and Send Link Response
- Process a response from the Generate and Send Link AP. Note that the API will return response data in Base64 format.
- Decode the response data. The sample code below demonstrates correctly decoded API response data.
- Read the Generate Link Response data from GenerateSendQPRes.
{
"GenerateSendQPRes": {
"version": "2.1",
"timeStamp": "20210126094403",
"qpID": "231095",
"orderIdPrefix": "QP-21126102038",
"currency": "SGD",
"amount": "100.00",
"expiry": "27012021",
"url": "https://demo2.2c2p.com/2C2PFrontend/qp/71NQ",
"successEmails": "[email protected]",
"successMobiles": "",
"failedEmails": "",
"failedMobiles": "+6599999999",
"resCode": "000",
"resDesc": "Success",
"hashValue": "2913D833897B6FD33A25C03423B88191DC7566CC"
}
}
eyJHZW5lcmF0ZVNlbmRRUFJlcyI6eyJ2ZXJzaW9uIjoiMi4xIiwidGltZVN0YW1wIjoiMjAyMTAxMjYwOTQ0MDMiLCJxcElEIjoiMjMxMDk1Iiwib3JkZXJJZFByZWZpeCI6IlFQLTIxMTI2MTAyMDM4IiwiY3VycmVuY3kiOiJTR0QiLCJhbW91bnQiOiIxMDAuMDAiLCJleHBpcnkiOiIyNzAxMjAyMSIsInVybCI6Imh0dHBzOi8vZGVtbzIuMmMycC5jb20vMkMyUEZyb250ZW5kL3FwLzcxTlEiLCJzdWNjZXNzRW1haWxzIjoidGVycmFuY2UudGF5QDJjMnAuY29tIiwic3VjY2Vzc01vYmlsZXMiOiIiLCJmYWlsZWRFbWFpbHMiOiIiLCJmYWlsZWRNb2JpbGVzIjoiKzY1OTk5OTk5OTkiLCJyZXNDb2RlIjoiMDAwIiwicmVzRGVzYyI6IlN1Y2Nlc3MiLCJoYXNoVmFsdWUiOiIyOTEzRDgzMzg5N0I2RkQzM0EyNUMwMzQyM0I4ODE5MURDNzU2NkNDIn19
Updated over 2 years ago