QuickPay Generate and Send Link API

👍

HTTPS POST / Server-to-Server

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

Go live when you are ready, Live endpoint is provided.

Generate and Send Link Request


Below are the guidelines that how to prepare a generate and send link request and send to 2c2p

  1. Below sample request data show the request structure. Refer Generate and Send Link Request Parameter for API Specification.
    Bind the Generate Link Request data into GenerateSendQPReq.
{
    "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"
    }
}
  1. Encode the request data using Base64 Format. Below show sample encoded request
ewoJIkdlbmVyYXRlU2VuZFFQUmVxIjogewoJCSJ2ZXJzaW9uIjogIjIuMSIsCgkJIm1lcmNoYW50SUQiOiAiSlQwNyIsCgkJIm9yZGVySWRQcmVmaXgiOiAiUVAtMjExMjYxMDIwMzUiLAoJCSJkZXNjcmlwdGlvbiI6ICJ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AoJCSJlbWFpbE1lc3NhZ2UiOiAiUGxlYXNlIG1ha2UgcGF5bWVudC4iLAoJCSJ0b01vYmlsZXMiOiAiKzY1OTk5OTk5OTkiLAoJCSJzbXNNZXNzYWdlIjogIk1ha2UgcGF5bWVudCBieSBERUMgMjAyMSIsCgkJInJlc3VsdFVybDIiOiAiaHR0cHM6Ly9kZW1vMi4yYzJwLmNvbS9wYXltZW50cmVzdWx0L3YzdWliYWNrZW5kdXJsLmFzcHgiLAoJCSJ0aW1lU3RhbXAiOiAiMjAyMTAxMjYxMDIxMzIiLAoJCSJoYXNoVmFsdWUiOiAiNTljYjQ1MDM5MDgxNmY1YTIzNjljODdhMzU4NTE0NzY4NmVkNzNlYyIKCX0KfQ==
  1. Send the encoded request data to API endpoint.

 

Generate and Send Link Response


Below are the guidelines that how to process generate and send link response from 2c2p.

  1. Generate and Send Link API will return response data in Base64 format. Sample response show below.
eyJHZW5lcmF0ZVNlbmRRUFJlcyI6eyJ2ZXJzaW9uIjoiMi4xIiwidGltZVN0YW1wIjoiMjAyMTAxMjYwOTQ0MDMiLCJxcElEIjoiMjMxMDk1Iiwib3JkZXJJZFByZWZpeCI6IlFQLTIxMTI2MTAyMDM4IiwiY3VycmVuY3kiOiJTR0QiLCJhbW91bnQiOiIxMDAuMDAiLCJleHBpcnkiOiIyNzAxMjAyMSIsInVybCI6Imh0dHBzOi8vZGVtbzIuMmMycC5jb20vMkMyUEZyb250ZW5kL3FwLzcxTlEiLCJzdWNjZXNzRW1haWxzIjoidGVycmFuY2UudGF5QDJjMnAuY29tIiwic3VjY2Vzc01vYmlsZXMiOiIiLCJmYWlsZWRFbWFpbHMiOiIiLCJmYWlsZWRNb2JpbGVzIjoiKzY1OTk5OTk5OTkiLCJyZXNDb2RlIjoiMDAwIiwicmVzRGVzYyI6IlN1Y2Nlc3MiLCJoYXNoVmFsdWUiOiIyOTEzRDgzMzg5N0I2RkQzM0EyNUMwMzQyM0I4ODE5MURDNzU2NkNDIn19
  1. Decode the response data using Base64 Format. Below show decoded Generate and Send Link Response Data
{
    "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"
    }
}
  1. Read the Generate Link Response data from GenerateSendQPRes. Refer Generate and Send Link Response Parameter for API Specification.