Card Scheme Token
How to IntegrateRefer 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 |
|---|
|
|
|
{
"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.
Please refer to: Payment Token API Response
{
"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 : |
|---|
|
|
|
|
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.
Please refer to: Payment Response - Backend API
{
"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.
Please refer to: Payment Inquiry API Request
{
"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.
Please refer to: Payment Inquiry API Response
{
"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"
}