DocumentationRecipesAPI ReferenceChangelog
Documentation

Card Scheme Token

🚧

How to Integrate

Refer to the high level diagram flow of Server-to-Server.

šŸ“˜

Please refer to the available payment channels below :
Card Scheme Token (CSToken)

Ā 

1. Prepare Payment Token Request

To prepare a payment token request, refer to the required parameters below.

šŸ“˜

Please refer to: Payment Token API Request

Pre Requisite
  1. MerchantID, secret code & currencyCode are provided by 2C2P.
  1. For PaymentChannel, merchants can refer to the available payment channels for Card Scheme Token
Merchants who already know which specific card payment needs to proceed may fill in the correspondingChannel Code, Category Code , or Group Code. The available payment channel will then be shown in the Payment Option and Payment Option Detail APIs.
  1. request3ds = N
{
	"merchantID": "JT01",
	"invoiceNo": "1523953661",
	"description": "item 1",
	"amount": 1000.00,
	"currencyCode": "SGD",
	"paymentChannel": [
		"CSTOKEN"
	],
	"request3ds": "N"
}

Ā 

2. Receive Payment Token Response

To receive a payment token response, refer to the sample payment token response below.

šŸ“˜

{
  "paymentToken": "kSAops9Zwhos8hSTSeLTUU3o184xaNR/T6ySCKGXyEBuOG+IdpUQMByX2CNQX7ogIAPBAgzDWpVj6447eDblRXUO/jOyK6mFETAAoLnxVjo=",
  "respCode": "0000",
  "respDesc": "Success"
}

Ā 

3. Validation of Payment Token

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

🚧

Please refer to: Payment Response Code

Ā 

4. Prepare Do Payment Request

Merchants must call the Do Payment API to request for payment. To prepare a payment request, refer to the sample payment request below.

Pre Requisite :
  1. Payment Token from Payment Token API
  1. ChannelCode from Payment Option Details API
  1. For the parameter payment.data , refer to the Payment Option Details API Response parameter channels.payment.input to determine the particular data required.
  1. To pass Card scheme token information into Digital PAN, expiryMonth, expiryYear
  1. Token contains decrypted network token parameters. Following the examples below:
The value should be base64 Encoded

For Google Pay
base64({ "channel": "GOOGLEPAY", "authMethod": "CRYPTOGRAM_3DS", "cryptogram":"{cryptogram data}", "eci": "{eci value}" })

For Apple Pay
base64({ "channel": "APPLEPAY", "authMethod": "CRYPTOGRAM_3DS", "cryptogram":"{ cryptogram data}" , "eci": "{eci value}"})


For Network Token (Visa & Mastercard)
base64({ "channel": "EXTERNAL","authMethod": "CRYPTOGRAM_3DS", "cryptogram":"{ cryptogram data}", "eci": "{eci value}" })


šŸ“˜

Please refer to: Do Payment API Request

{
	"payment": {
		"code": {
			"channelCode": "CSTOKEN"
		},
		"data": {
			"name": "Terrance Tay",
			"email": "[email protected]",
			"cardNo" : "{DIGITAL_PAN}",
			"expiryMonth": "{EXPIRY_MONTH}",
			"expiryYear": "{EXPIRY_YEAR}",
			"token": "eyAiY2hhbm5lbCI6ICJFWFRFUk5BTCIsICJhdXRoTWV0aG9kIjogIkNSWVBUT0dSQU1fM0RTIiwgImNyeXB0b2dyYW0iOiJBRFY5RStTMDZ5V2FBQUdUUUhRbEdnQURGQT09IiwgImVjaSI6IjAyIiB9"
		}
	},
	"clientIP": "175.139.9.173",
	"paymentToken": "kSAops9Zwhos8hSTSeLTUXvfNA7ZE0pxOdr5WUx0Ns/ek/yQU4Hkg8cz5QcnVTlMqz//r2NtpdRmiu1pOpKsDv1byMx7OK/qq4CaRgQbvAU=",
	"locale": "en",
	"clientID": "30c7cf51-75c4-4265-a70a-effddfbbb0ff"
}

Ā 

5. Receive Do Payment Response

To receive a payment response, refer to the the sample payment response below.

šŸ“˜

Please refer to: Do Payment API Response

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

Ā 

6. Receive Payment Response via backend API

For merchants who have implemented "Receive Payment Response via backend API", refer to the sample backend payment response below.

šŸ“˜

{
  "merchantID": "JT04",
  "invoiceNo": "280520075921",
  "accountNo": "411111XXXXXX1111",
  "amount": "230.87",
  "currencyCode": "THB",
  "tranRef": "2868821",
  "referenceNo": "2785703",
  "approvalCode": "531484",
  "eci": "05",
  "transactionDateTime": "20200528080508",
  "respCode": "0000",
  "respDesc": "Success"
}

Ā 

7. Payment Inquiry to retrieve payment information

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

To prepare a payment inquiry request, refer to the sample payment inquiry request below.

šŸ“˜

{
    "paymentToken": "kSAops9Zwhos8hSTSeLTUXvfNA7ZE0pxOdr5WUx0Ns/ek/yQU4Hkg8cz5QcnVTlMqz//r2NtpdRmiu1pOpKsDv1byMx7OK/qq4CaRgQbvAU=",
    "merchantID": "JT04",
    "invoiceNo": "254b77aabc",
    "locale": "en"
}

Ā 

8. Receive Payment Inquiry Response

To receive a payment inquiry response, refer to the sample payment inquiry response below.

šŸ“˜

{
  "merchantID": "JT04",
  "invoiceNo": "280520075921",
  "cardNo": "411111XXXXXX1111",
  "amount": "230.87",
  "currencyCode": "THB",
  "tranRef": "2868821",
  "referenceNo": "2785703",
  "approvalCode": "531484",
  "eci": "05",
  "transactionDateTime": "20200528080508",
  "respCode": "0000",
  "respDesc": "Success"
}