Do Payment

👍

HTTPS POST / Server-to-Server

Sandbox endpoint : sandbox-pgw.2c2p.com/payment/4.1/payment
Run test with Swagger Editor

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

Do Payment API allow merchant to make payment.

Do Payment Request


Below sample request data show the data structure. Refer Do Payment Request Parameter for API Specification.

{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
    "clientID": "E380BEC2BFD727A4B6845133519F3AD7",
    "locale": "en",
    "responseReturnUrl": "https://pgw.2c2p.com/ui/4.1/info",
    "payment": {
        "code": {
            "channelCode": "CC",
            "agentCode": "SCB",
            "agentChannelCode": "ATM"
        },
        "data": {
            "name": "DavidBilly",
            "email": "[email protected]",
            "mobileNo": "0888888888",
            "accountNo": "0898989898",
            "securePayToken": "00acNz9uu0tZuVSSiQ...OwfCzy" //For encrypt card no, expiry 
        }
    }
}

 

Do Payment Response


Below sample response data show the data structure. Refer Do Payment Response Parameter for API Specification.

//1) Non-redirect (Transaction completed)
{
    "channelCode": "CC",
    "invoiceNo": "1523953661",
    "respCode": "2000",
    "respDesc": "Transaction is completed, please do payment inquiry request for full payment information."
}
 
 
//2) Redirect(Mobile/Web-IFrame) & (Alternative Payment Method for WebPay)
{
    "channelCode": "CC",
    "data": "https://api.2c2p.com/pgw/authenticate/e5d8d1ed-2684-48b2-a7b6-d36fbc4fa5c2",
    "respCode": "1000",
    "respDesc": "Redirect to authenticate ACS bank page."
}
 
 
//3) Redirect(Web-New Tab)
{
    "channelCode": "CC",
    "data": "https://api.2c2p.com/pgw/authenticate/e5d8d1ed-2684-48b2-a7b6-d36fbc4fa5c2",
    "respCode": "1001",
    "respDesc": "Redirect to authenticate ACS bank page."
}
 
 
//4) Redirect(Mobile-External Browser for multiple tab)
{
    "channelCode": "BANK",
    "data": "https://api.2c2p.com/pgw/authenticate/e5d8d1ed-2684-48b2-a7b6-d36fbc4fa5c2",
    "respCode": "1002",
    "respDesc": "Redirect to E-NETS DBS page."
}
 
 
//5) Non-Redirect (Alternative Payment Method(123) for Payment Slip)
{
    "channelCode": "COUNTER",
    "data": "https://api.2c2p.com/pgw/slip/254b77a5-5568-49ca-9e0e-2f8d28be95e7",
    "respCode": "1003",
    "respDesc": "Transaction is pending for payment, please wait for backend notification."
}
 
 
//6) Redirect(Mobile-External APP)
{
    "channelCode": "OCTOPUS",
    "data": "octupus://token?e5d8d1ed-2684-48b2-a7b6-d36fbc4fa5c2",
    "respCode": "1004",
    "respDesc": "Redirect to OCTOPUS app."
}
 
 
//7) Generate QR
{
    "channelCode": "CSQR",
    "type": "URL",
    "data": "https://api.2c2p.com/pgw/qr/e5d8d1ed-2684-48b2-a7b6-d36fbc4fa5c2.png",
    "respCode": "1005",
    "respDesc": "Pending for user scan QR."
}