QuickPay Send Link API

👍

HTTPS POST / Server-to-Server

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

  • Encode the QuickPay Send Link request
  • Decode the QuickPay Send Link response
https://demo2.2c2p.com/2C2PFrontEnd/QuickPay/DeliveryAPI
https://t.2c2p.com/QuickPay/DeliveryAPI

📘

API Parameter

Send Link Request Parameter
Send Link Response Parameters

Send Link Request


  1. Prepare an API request to send a QuickPay link.
  2. Bind the Send Link Request data into QPSendReq.

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

{
    "QPSendReq": {
        "version": "2.0",
        "merchantID": "JT01",
        "qpID": "231095",
        "toEmails": "[email protected]",
        "ccEmails": "",
        "bccEmails": "[email protected]",
        "emailSubject": "Promotion and sales ! Last chance to buy now!",
        "emailMessage": "Please make payment.",
        "toMobiles": "+6599999999",
        "smsMessage": "Make payment before 2022 Dec",
        "timeStamp": "20210126105923",
        "hashValue": "fa08035ed94b5b7ec18c4c8ba1d55b76998df268"
    }
}
ewoJIlFQU2VuZFJlcSI6IHsKCQkidmVyc2lvbiI6ICIyLjAiLAoJCSJtZXJjaGFudElEIjogIkpUMDEiLAoJCSJxcElEIjogIjIzMTA5NSIsCgkJInRvRW1haWxzIjogInRlcnJhbmNlLnRheUAyYzJwLmNvbSIsCgkJImNjRW1haWxzIjogIiIsCgkJImJjY0VtYWlscyI6ICJ0ZXJyYW5jZS50YXlAMmMycC5jb20iLAoJCSJlbWFpbFN1YmplY3QiOiAiUHJvbW90aW9uIGFuZCBzYWxlcyAhIExhc3QgY2hhbmNlIHRvIGJ1eSBub3chIiwKCQkiZW1haWxNZXNzYWdlIjogIlBsZWFzZSBtYWtlIHBheW1lbnQuIiwKCQkidG9Nb2JpbGVzIjogIis2NTk5OTk5OTk5IiwKCQkic21zTWVzc2FnZSI6ICJNYWtlIHBheW1lbnQgYmVmb3JlIDIwMjIgRGVjIiwKCQkidGltZVN0YW1wIjogIjIwMjEwMTI2MTA1OTIzIiwKCQkiaGFzaFZhbHVlIjogImZhMDgwMzVlZDk0YjViN2VjMThjNGM4YmExZDU1Yjc2OTk4ZGYyNjgiCgl9Cn0=
  1. 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 'ewoJIlFQU2VuZFJlcSI6IHsKCQkidmVyc2lvbiI6ICIyLjAiLAoJCSJtZXJjaGFudElEIjogIkpUMDEiLAoJCSJxcElEIjogIjIzMTA5NSIsCgkJInRvRW1haWxzIjogInRlcnJhbmNlLnRheUAyYzJwLmNvbSIsCgkJImNjRW1haWxzIjogIiIsCgkJImJjY0VtYWlscyI6ICJ0ZXJyYW5jZS50YXlAMmMycC5jb20iLAoJCSJlbWFpbFN1YmplY3QiOiAiUHJvbW90aW9uIGFuZCBzYWxlcyAhIExhc3QgY2hhbmNlIHRvIGJ1eSBub3chIiwKCQkiZW1haWxNZXNzYWdlIjogIlBsZWFzZSBtYWtlIHBheW1lbnQuIiwKCQkidG9Nb2JpbGVzIjogIis2NTk5OTk5OTk5IiwKCQkic21zTWVzc2FnZSI6ICJNYWtlIHBheW1lbnQgYmVmb3JlIDIwMjIgRGVjIiwKCQkidGltZVN0YW1wIjogIjIwMjEwMTI2MTA1OTIzIiwKCQkiaGFzaFZhbHVlIjogImZhMDgwMzVlZDk0YjViN2VjMThjNGM4YmExZDU1Yjc2OTk4ZGYyNjgiCgl9Cn0=

 

Send Link Response


  1. Process a response from the Send Link 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 Send Link Response data from QPSendRes.
{
    "QPSendRes": {
        "version": "2.0",
        "timeStamp": "20210126100034",
        "qpID": "231095",
        "successEmails": "[email protected]",
        "successMobiles": "",
        "failedEmails": "",
        "failedMobiles": "+6599999999",
        "resCode": "000",
        "resDesc": "Success",
        "hashValue": "2054F4A23C73EFE27CFB713E8AF3840AEDA79870"
    }
}
eyJRUFNlbmRSZXMiOnsidmVyc2lvbiI6IjIuMCIsInRpbWVTdGFtcCI6IjIwMjEwMTI2MTAwMDM0IiwicXBJRCI6IjIzMTA5NSIsInN1Y2Nlc3NFbWFpbHMiOiJ0ZXJyYW5jZS50YXlAMmMycC5jb20iLCJzdWNjZXNzTW9iaWxlcyI6IiIsImZhaWxlZEVtYWlscyI6IiIsImZhaWxlZE1vYmlsZXMiOiIrNjU5OTk5OTk5OSIsInJlc0NvZGUiOiIwMDAiLCJyZXNEZXNjIjoiU3VjY2VzcyIsImhhc2hWYWx1ZSI6IjIwNTRGNEEyM0M3M0VGRTI3Q0ZCNzEzRThBRjM4NDBBRURBNzk4NzAifX0=