These docs are for v4.0.2. Click to read the latest docs for v4.3.0.

IPP (Installment Payment Plan)

1. Prepare Payment Token Request

Refer to the required parameters below to create a payment token.

📘

Please refer: Payment Token API Request

Pre Requisite

  1. MerchantID, secret code & currencyCode are provided by 2c2p.
  1. Payment Channel set IPP
  1. Set available installmentPeriodFilter
{
    "merchantID": "JT01",
    "invoiceNo": "020620102231",
    "description": "item 1",
    "amount": 10500.00,
    "currencyCode": "THB",
    "paymentChannel" : ["IPP"], //Available value is "IPP" only.
    "installmentPeriodFilter": [6,12]
}

 

2. Receive Payment Token Response

Refer to the sample payment token response below.

📘

Please refer: Payment Token API Response

{
  "webPaymentUrl": "https://sandbox-pgw-ui.2c2p.com/payment/4.1/#/token/kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu%2bKKSegjUjERKCyWPg%3d",
  "paymentToken": "kSAops9Zwhos8hSTSeLTUcCrwcnrndJUZanGJy3fBEsXCiYmynwxHvK5h7XPBadJqD0nG7v65t5N2jPVrnwX2jL4nu+KKSegjUjERKCyWPg=",
  "respCode": "0000",
  "respDesc": "Success"
}

 

3. Validation of Payment Token

Proceed only when the parameter "respCode" is "0000" which indicates success. Otherwise, terminate the payment process. Refer to the Payment Response Code below.

🚧

Please refer : Payment Response Code

 

4. Redirect to Payment Page

Redirect to the payment page via browser. The payment page URL is returned from the parameter "webPaymentUrl". Customers enter their payment information and select an available installment plan.

 

5. Receive Payment Response via backend API

📘

Please refer : Payment Response - Backend API

The parameter "backendReturnUrl" that was previously sent via Payment Token Request is the merchant endpoint that will receive a backend notification. If the parameter "backendReturnUrl" is not set, the system will obtain the backend return URL from the merchant profile set in 2C2P's merchant portal.

{
  "merchantID": "JT01",
  "invoiceNo": "020620102231",
  "cardNo": "411111XXXXXX1111",
  "amount": "10500.00",
  "currencyCode": "THB",
  "tranRef": "2876051",
  "referenceNo": "2792709",
  "approvalCode": "383321",
  "eci": "05",
  "transactionDateTime": "20200602103003",
  "agentCode": "KTC",
  "channelCode": "VI",
  "issuerCountry": "US",
  "installmentPeriod": "6",
  "interestType": "M",
  "interestRate": "1.0000",
  "installmentMerchantAbsorbRate": "0.0000",
  "respCode": "0000",
  "respDesc": "Success"
}

 

6. Receive Payment Response via browser redirection

📘

Please refer : Payment Response - Frontend API

The parameter "frontendReturnUrl" that was previously sent via Payment Token Request is the merchant page that customers will be redirected to. If the parameter "frontendReturnUrl" is not set, the system will obtain the front end return URL from the merchant profile set in 2C2P's merchant portal. Refer to the sample response returned below.

{"invoiceNo":"020620102231","channelCode":"CC","respCode":"2000","respDesc":"Transaction is completed, please do payment inquiry request for full payment information."}

The parameter "respCode" specifies the status of the transaction and also indicates what action should be performed next. Refer to the Payment Flow Response Code below.

🚧

Please refer : Payment Flow Response Code

 

7. Payment Inquiry to retrieve the payment information

📘

Please refer : Payment Inquiry API

For merchants who do not implement "Receive Payment Response via backend API", they are required to call Payment Inquiry API to receive the payment response.