Payment Option Details

👍

HTTPS POST / Server-to-Server

https://sandbox-pgw.2c2p.com/payment/4.3/paymentOptionDetails
https://pgw.2c2p.com/payment/4.3/paymentOptionDetails

📘

API Parameter

Payment Option Details Request Parameters
Payment Option Details Response Parameters

The Payment Option Details API allows merchants to retrieve details on all their available payment options in a single request.

Payment Option Details Request


The sample code below illustrates the correct API request structure.

{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
    "clientID": "E380BEC2BFD727A4B6845133519F3AD7",
    "locale": "en",
    "categoryCode": "GCARD",
    "groupCode": "CC"
}
curl --location --request POST 'https://sandbox-pgw.2c2p.com/payment/4.3/paymentOptionDetails' \
--header 'Content-Type: application/json' \
--data-raw '{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
    "clientID": "E380BEC2BFD727A4B6845133519F3AD7",
    "locale": "en",
    "categoryCode": "GCARD",
    "groupCode": "CC"
}'

 

Payment Option Details Response


The sample code below illustrates the API response structure.

{
    "name": "XXX Payment",
    "categoryCode": "CATEGORY_CODE",
    "groupCode": "GROUP_CODE",
    "iconUrl": "https://img.2c2p.com/pgw/CATEGORY_CODE.png",
    "validation": {  //Payment channel validations
        "cardNo": {
            "prefixes": ["411111", "544444", "555555", "4", "54", "55"],
            "regex": "^4[0-9]{12}(?:[0-9]{3})?$"
        },
        "cardTypes": [{  //Allowed card type for installment payment plan
            "sequenceNo": 1,
            "name": "VISA",
            "prefixes": ["4"],
            "regex": "^(4[0-9]*)$",
            "iconUrl": "https://img.2c2p.com/pgw/vi.png"
        }]
    },
    "channels": [{  //List of enabled payment channels
        "sequenceNo": 1,
        "name": "VISA",  //Payment channel information for UI
        "currencyCodes": ["THB"],
        "iconUrl": "https://img.2c2p.com/pgw/icon/vi.png",
        "logoUrl": "https://img.2c2p.com/pgw/vi.png",
        "isDown" : false,
        "payment": {  //Payment context can provide an as-seemless-as-possible integration of the payment process into the UI-flow
            "code": {  //Payment code to be submitted on Do Payment request
                "channelCode": "CC",
                "agentCode": "SCB",
                "agentChannelCode": "ATM"
            },
            "input": {  //Input parameters which need to be retrieved from customer for UI
                "name": "M",
                "email": "O",
                "mobileNo": "O",
                "cardNo": "M",
                "expiryDate": "M",
                "securityCode": "M",
                "pin": "I",
                "token": "I",
                "accountNo": "I"
            },
            "validation": {  //Validation of customer input data of parameters
                "name": "^(?:[a-zA-Z0-9]+)?$",
                "email": "^[A-Z0-9._%+-]+@[A-Z0-9.-]+\\.[A-Z]{2,6}$",
                "mobileNo": "[0-9]+",
                "cardNo": "^4[0-9]{12}(?:[0-9]{3})?$",
                "expiryDate": "^(2d{3}0?[1-9]|1[012])$",
                "securityCode": "^[0-9]{3}$",
                "pin": "^[0-9]{6}$",
                "token": "(.*?)",
                "accountNo": "[0-9]+",
                "additional": {  //Additional validation on parameters for identification or additional validation purpose
                    "cardNo": {
                        "luhn": true,
                        "prefixes": ["4"]
                    },
                    "amount" : {
                        "min" : 100,
                        "max" : 10000
                    }
                }
            },
            "info": {  //Payment Channel specific additional information
                "terms": "bank’s ipp terms and conditions",
                "promoUrl": "https://img.2c2p.com/pgw/promo.png",
                "plans": [{  //Installment Payment plan list
                    "sequenceNo": 1,
                    "period": 3,
                    "interestType": "M",
                    "interestRate": 0.0000,
                    "monthlyAmount": 0.16667,
                    "monthlyInterest": 0.00000,
                    "currencyCode": "SGD",
                    "label": "0% interest promotion (monthly installment amount 0.16667 SGD)"
                }, {
                    "sequenceNo": 2,
                    "period": 6,
                    "interestType": "C",
                    "interestRate": 1.0000,
                    "monthlyAmount": 0.16667,
                    "monthlyInterest": 0.00000,
                    "currencyCode": "SGD",
                    "label": "6 months with 1.0000% interest (monthly installment amount 0.16667 SGD)"
                }]
            }
        }
    }],
    "configuration": {
        "payment": {
            "immediatePayment": false,
            "tokenize": false,
            "tokenizeOnly": false,
            "cardTokenOnly": false,
            "fx": {
                "mcp": {
                    "active": true,
                    "terms": "MCP's terms and conditions."
                },
                "dcc": {
                    "active": false,
                    "terms": "DCC's terms and conditions."
                }
            }
        },
        "notification": {
            "facebook": true,
            "whatsApp": true,
            "line": true
        }
    },
    "respCode": "0000",
    "respDesc": "success"
}

Run test with Swagger Editor