QuickPay Send Link API

👍

HTTPS POST / Server-to-Server

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

To go live, please refer to: Live endpoint guide

Send Link Request


  1. To prepare an API request to send a QuickPay link, refer to the sample request structure below.

For specific API request parameters, refer to: Send Link Request Parameter

{
    "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"
    }
}
  1. Bind the Send Link Request data into QPSendReq.

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

ewoJIlFQU2VuZFJlcSI6IHsKCQkidmVyc2lvbiI6ICIyLjAiLAoJCSJtZXJjaGFudElEIjogIkpUMDEiLAoJCSJxcElEIjogIjIzMTA5NSIsCgkJInRvRW1haWxzIjogInRlcnJhbmNlLnRheUAyYzJwLmNvbSIsCgkJImNjRW1haWxzIjogIiIsCgkJImJjY0VtYWlscyI6ICJ0ZXJyYW5jZS50YXlAMmMycC5jb20iLAoJCSJlbWFpbFN1YmplY3QiOiAiUHJvbW90aW9uIGFuZCBzYWxlcyAhIExhc3QgY2hhbmNlIHRvIGJ1eSBub3chIiwKCQkiZW1haWxNZXNzYWdlIjogIlBsZWFzZSBtYWtlIHBheW1lbnQuIiwKCQkidG9Nb2JpbGVzIjogIis2NTk5OTk5OTk5IiwKCQkic21zTWVzc2FnZSI6ICJNYWtlIHBheW1lbnQgYmVmb3JlIDIwMjIgRGVjIiwKCQkidGltZVN0YW1wIjogIjIwMjEwMTI2MTA1OTIzIiwKCQkiaGFzaFZhbHVlIjogImZhMDgwMzVlZDk0YjViN2VjMThjNGM4YmExZDU1Yjc2OTk4ZGYyNjgiCgl9Cn0=
  1. Send the encoded request data to the API endpoint.

 

Send Link Response


  1. To process a response from the Send Link API, refer to the sample response below. Note that the API will return response data in Base64 format.
eyJRUFNlbmRSZXMiOnsidmVyc2lvbiI6IjIuMCIsInRpbWVTdGFtcCI6IjIwMjEwMTI2MTAwMDM0IiwicXBJRCI6IjIzMTA5NSIsInN1Y2Nlc3NFbWFpbHMiOiJ0ZXJyYW5jZS50YXlAMmMycC5jb20iLCJzdWNjZXNzTW9iaWxlcyI6IiIsImZhaWxlZEVtYWlscyI6IiIsImZhaWxlZE1vYmlsZXMiOiIrNjU5OTk5OTk5OSIsInJlc0NvZGUiOiIwMDAiLCJyZXNEZXNjIjoiU3VjY2VzcyIsImhhc2hWYWx1ZSI6IjIwNTRGNEEyM0M3M0VGRTI3Q0ZCNzEzRThBRjM4NDBBRURBNzk4NzAifX0=
  1. Decode the response data. The sample code below demonstrates correctly decoded API response data.
{
    "QPSendRes": {
        "version": "2.0",
        "timeStamp": "20210126100034",
        "qpID": "231095",
        "successEmails": "terran[email protected]",
        "successMobiles": "",
        "failedEmails": "",
        "failedMobiles": "+6599999999",
        "resCode": "000",
        "resDesc": "Success",
        "hashValue": "2054F4A23C73EFE27CFB713E8AF3840AEDA79870"
    }
}
  1. Read the Send Link Response data from QPSendRes.

For specific API response parameters, refer to: Send Link Response Parameters