Customer Token Maintenance

2C2P's Customer Token Maintenance API allows merchants to manage tokenized customer data. Using the API, merchants can add, check, update, or delete customer token data.

👍

HTTPS POST / Server-to-Server

Payment requests and responses are encrypted using JWE

  • JWE algorithm = RSA-OAEP + A256GCM
  • The signature uses JWS PS256

Merchants must know how to prepare requests and process responses using JWE + JWS with exchange key.

 

  

Add Customer Token Request


https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/add
https://pgw.2c2p.com/customertoken/3.0/CustomerToken/add

To prepare an add card token request, refer to the guidelines below.

📘

Provided Sample Code

The following sample code demonstrates how to prepare request data, generate the JWT token with key, and send the API request.

For the JWT token, you may also refer to the sample code here.

  1. To prepare the data payload for the add customer token request, refer to the sample structure shown below. You may also check the API specifications here: Add Customer Token Request Parameters
  2. To generate encrypted request data, refer to this guide: Generate JWT Request with Keys
{
    "merchantID": "458458000000000",
    "accountNo": "4111111111111111",
    "name": "Terrance",
    "email": "[email protected]",
    "expiry": "2024-02-01",
    "accountIssuer": "UOB Bank",
    "accountIssuerCountry": "SG",
    "accountCurrency": "SGD",
    "tokenProvider": "CC"
}
eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5NbWtNVHExSUFIN2pDb0xfdHdfTW9Va1NzQ1BwdG5oM01CQmt1OG1VSVVpVml5R0lkdllrTlk2UXVsd0lvNGpPOXdLSnRhM0RWdHhhc1JTa1RCUWxQMWhXV0VIcElETzhMX05qSnVGRHBHdDJ4Y1JFNjJnTEN5ZFVhcXE5NEp1VFJfeXYzeG5QaG5WSHBDTHd3eVJqQmdhbWNYLUVFY2dDUFNOV2s5bFpTZkVrbkNCMnBKUHhDWFowcmtNejBFUktreHZWYkN6LUl3UldVUVczYkNrWGtLSWZqN2FXZFBhd1J4S1BKQ2hJS2RQdU1sY05xLVlPQW9hRGtTNkxvNEhrazRVU0xQZDNxblF5N1hiYnBmS0tmN2t4cVd3QUF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kRtcHBYdXZ3bGhCNnNSSjVhRVl6N0ZHV1RrQ08zUkFKQjhPX0w4WVRVRUxJU3BkUWlsOVNsTFBVRFRVNUkubUZoZ2ttQldOOU53WWplcEpQWEF6Zw.VC4apI3PQUa21gLaP8GLpteTQpgVsT94ZSEj3JlLu5zbYhOklD_iywFLGvvZx-8Dpcb09pwu9G83H0Xagsbmuk1TB6-zxSt9mIgHFN-1B88g9CS1aPEwBH31Vp3JLwxk5Xya5dzbsvzSDOlOho6C6PuoaCnfjmbuDZPaKAuzmJ_VAg1QTOiNVfeuFNaW0pyR2Jl1pZUMi4ZuAYMG4ZnWBgHhUWlBP_mpVGvGvsofA6Nh6OudGdDVdqSo6tM6koMjYrRAzNadaQtg586pQ155WgPlqAIE4RtbsKDFLI5E0FpG8AzVPzaggy45R-VrkEB4UoLrH6OEtB-VNY4IHHMAhg'

 

Add Customer Token Response


To receive and process add customer token request responses, refer to the sample code below.

📘

Provided Sample Code

The following sample code demonstrates how to receive response data and decrypt the JWT token with key.

For decrypting the JWT token, you may also refer to the sample code here.

  1. To decrypt the response, refer to: Process JWT Request with Keys

  2. Refer to the sample response structure below. You may also check the API specifications here: Add Customer Response Parameters

eyJhbGciOiJQUzI1NiIsImtpZCI6IjEifQ.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5IaWt5WjRDN0gyaW9sRVMwWU11TnhpSWFRd2dWMVc1cG8zSWZUTXQ1R19YZURwMEJTaTZkWE1sYzNsTUI1N09yZUZsd29MMnN1NjhzWGItU1piSmd0Ui1xRTdaLU45ZzQ4X3J6Zno1SHl0b01Hc2hqb2ttV3lxUjZtZWFWX1lremFHY2xVR05mQ3VaYk9lX21KRjlTV3FsczIwYnVUZVlybm9MeGRKTDVMRHZjblo1dmt1cTBCV280eXRyRk9KUmlNWXZFMTZyTVpfUmo4X0RZMy1XaWc4REw3b1hMTmxyaUIwYVNZNU43RDVpR29DeURKM2xtS0taYXF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e-XvlknRPE0QGRfvJKpA3iT79O8w6RBkq5xEbMyOkVbBdC4XFD-oEOpDjkIU4w
{
	"merchantID": "458458000000000",
	"token": "261020155003189559",
	"tokenReference": "",
	"accountNo": "411111XXXXXX1111",
	"name": "Terrance",
	"email": "[email protected]",
	"expiry": "2024-02-01",
	"accountIssuer": "UOB Bank",
	"accountIssuerCountry": "SG",
	"accountCurrency": "SGD",
	"channelCode": "",
	"subChannelCode": "",
	"responseCode": "0000",
	"responseDesc": "Success"
}

 

Update Customer Token Request


https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/update
https://pgw.2c2p.com/customertoken/3.0/CustomerToken/update

To prepare an update customer token request, refer to the guidelines below.

📘

Provided Sample Code

The following sample code demonstrates how to prepare request data, generate the JWT token with key, and send the API request.

For the JWT token, you may also refer to the sample code here.

  1. To prepare the data payload for the update card token request, refer to the sample structure shown below. You may also check the API specifications here: Update Customer Token Request Parameters
  2. To generate encrypted request data, refer to this guide: Generate JWT Request with Keys
{
    "merchantID": "458458000000000",
    "token": "261020155003189559",
    "name": "Terrance",
    "email": "[email protected]",
    "expiry": "2024-09-30",
    "accountIssuer": "HSBC Bank",
    "accountIssuerCountry": "MY",
    "accountCurrency": "MYR",
    "tokenProvider": "CC"
}
eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5saEcyNTFTLTlPdEhSaFo2RE0wUExFZ0puVFlCSXJsZVJhajJvRC1oWEtCUTM1bmpta21ONmZGWHBKMWV4SDVIVWZodHB0SzZJdFVpaGZXRUJpR0ZULUxWaDhtT2VGTzBsZ3hiRmw0LWZVRlNqUFNFeFhhTHZIRk9YLUsxMmNGLW1Db1FRZjJZU2s3TWNWczBxQTF1ZzN3c1hRQTlvdVJjMUp3NWVqM25HZmpWemJ0VE93RXhfcGlfY3R6TTk1U2w1UW1YR1VDVW1mUV84aDlmemtUaG9YNS1ldG45NzZMb3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eDO3VYeOg
  1. To send the encrypted request via API, refer to the sample request below.
curl --location 'https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/update' \
--header 'Content-Type: text/plain' \
--data 'eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5saEcyNTFTLTlPdEhSaFo2RE0wUExFZ0puVFlCSXJsZVJhajJvRC1oWEtCUTM1bmpta21ONmZGWHBKMWV4SDVIVWZodHB0SzZJdFVpaGZXRUJpR0ZULUxWaDhtT2VGTzBsZ3hiRmw0LWZVRlNqUFNFeFhhTHZIRk9YLUsxMmNGLW1Db1FRZjJZU2s3TWNWczBxQTF1ZzN3c1hRQTlvdVJjMUp3NWVqM25HZmpWemJ0VE93RXhfcGlfY3R6TTk1U2w1UW1YR1VDVW1mUV84aDlmemtUaG9YNS1ldG45NzZMb3VIYnA5aThJdkc0TnhmaWYxUzRTUklyNHgtMkdlRmx2bUhSaWNFTTYxYjRKVFZnTU4tYnlrbHJIRUw5RWVTLWtITDBPT01yZTlyYmdybGRaUjdHLWFoNUR0cFlpNHdjT3N2ZFZ4LXZteW00eHNNTGdxYWhsZ1EuNDVIN0JESmtHUm9tMlEtNi56cDV0eUI1UEtqdU9IdlhnNHo3emxwN3FjT2IzQWVMNjlMdU1xcVA1RE9SUXMwd1VjdjlvZDhLdTdyRkdEby1aVG52SlN3ZUhxRFFoXzFYUmdxdTI3N0JidUtEalhsa3hZM3FRY2x3WU9FQ1JrWkd1aWJmLU1nT1ZNcFd2YWNwMC1YY0NvT25hN1dOSDJIZ2YtTVE0RjhCSzZoMEhyNXFiTF94T0V0RUhvMmZQbFZja1pGRzZBa2dzeEFnNk01Q3E5Ylk4WE05R2cxNHRzVFRzaWl6UnU4ZUxIRmJOS1BmcDhYRUhKVVZBVks2SHZ6V1UzZGxuMVZ5ek5qQlBUbVpTcER4bTlrQmJWSE1QdUZMUzQwd3hOVndzb0p6MkQwZUYtMGhBS25MNGJib3RtWDNLbFhfUWYwRUdrZDZ2SndPSHl5XzJDYlRReGxBTnlzTFlOOXAtOWFsWGd6dVFqOFUzbklhSk9jNzlEeFUtVkNvVENYYl9tbnZWM25FWm5zX3pIdy4yZjRFSXJkNTE3UThtblZobXRjOWNB.SrDOky72lwMLsFj2fL2JNWYxTp54Emqmvdjzy6lxAxYcDj8mVwZoWhuAjri-u3K-HA2rWMD093DBYkFVXJ33l9eJRmwnlMXz0EnsLr6ACYktlLS_hRWbq-2qLOXPK78ATo5jJLJraaQ6COAQBKre6Mwrz9FRWgDnkmK75Lh-uzLK8brfBWIr4MmHLgV-E-IuZq08x7IT5h4zGbLtrJgoW_RbZDEC7lAfz6G2RZLK3AHmHv54iD6e8rYv6Om3f66B4BW4EFvmJ2rIPogI12hFHSxyfXSmJZZTDOluExHqQUm2dcEG4R6UsWowCxR2y-7B1GrOOX5-wvAB_eDO3VYeOg'

Update Customer Token Response


To receive and process update card token request responses, refer to the sample code below.

📘

Provided Sample Code

The following sample code demonstrates how to receive response data and decrypt the JWT token with key.

For decrypting the JWT token, you may also refer to the sample code here.

  1. To decrypt the response, refer to: Process JWT Request with Keys

  2. Refer to the sample response structure below. You may also check the API specifications here: Update Customer Token Response Parameters

eyJhbGciOiJQUzI1NiIsImtpZCI6IjEifQ.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5mZUlDVk9rRVByYlV6YjZLazR6b0dkSE8xb2k2eU5MTzVPWWEzM1dkaldrQ1ZHbzYyYnZJMDQyd1VPTUhUd2dUd1pOYlIzeHRWcEtUdDFuSEsyNUJrN3d4YmZ5YkJOMUhFLXhzR2hzR2JpWHExV2F1TlY3eWsyQ3dfU2U3UTllX0JEVk1hWko5c1ExdExOd0pDcC01R2xTdmp1dTkycG5WdGVHbzZfTGV4TDN5SVhOTE9LeTFFZ3pTelZEYlBjWVZ3bEJjWTZ1Rmlkd3RORHFmNHdU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G9GQC6bXRLAt8ngCx_0z0-QH5wHl8a8dyM3a-g_9CLbAQ
{
	"merchantID": "458458000000000",
	"token": "261020155003189559",
	"name": "Terrance",
	"email": "[email protected]",
	"expiry": "2024-09-30",
	"accountIssuer": "HSBC Bank",
	"accountIssuerCountry": "MY",
	"accountCurrency": "MYR",
	"channelCode": "",
	"subChannelCode": "",
	"responseCode": "0000",
	"responseDesc": "Success"
}

 

Inquiry Customer Token Request


https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/get
https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/get

To retrieve customer token, refer to the guidelines below.

📘

Provided Sample Code

The following sample code demonstrates how to prepare request data, generate the JWT token with key, and send the API request.

For the JWT token, you may also refer to the sample code here.

  1. To prepare the data payload for the delete card token request, refer to the sample structure shown below. You may also check the API specifications here: Inquiry Customer Token Request Parameters

2.To generate encrypted request data, refer to this guide: Generate JWT Request with Keys

{
    "merchantID": "458458000000000",
    "token": "261020155003189559"
}
eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5tdEI4ejBrT0d1MF9sMGZ3cm5rY1F5VHpRdTBjODN2aWpFTXNGNFBMeUVFQWRaNUhzOXNJM1hNYnFMeWJjR3d3bko5b2dPNGRxNlM4c1M0RURVMkdWT01NSms2anZ2TmpWNU5xU2FnYk5qdXViOVNTZVhMN2xORUE1a2lUdDE2YWZKa3g0cV96S29VMEs5TTducGotbVp3SGFxSUloeFFLVHZ5aE9OdVVzbW9xMWVQUElraVk1NldyUnFmYURIV3FTZ0pZaTF4M3hVY2U0YmFGZWtwN0twczF6aktLYWZwQVVZZGtoZ19rZ1NqX09EV3RhUkZGeXV1S2FQcTI1X3R1RUNJSUw2RmlDLWlwN2dqcDQ3S1QwdVBUdUR1Ny02R1o1elBNUXdvQnpicEw2ejE3M0FCcEowSGlLYVVOY2VlMDJaS2djbnEyOW5nc1hWejdnZzNWNUEuUmdrZGVTU09xQk8zY1V2WS51SWwtbUlseVRuckE2T0RJLUFNM0lmTTJRbFROU3Z4RlJuWG1jcWtIS2pmb1JMLVMwMS15d3FsOVE4UzVMaGVXb2RURlJVVElVTEJTUXRJVEhZRTQyVmtMWWVUTUJHSUN5eFkueXU3OFdWY1lwaUlnNmpVcGw4M1B4Zw.JhwxPx6p7SUqpS8f4eptX9bC5PdK36AUvVNWIj24igPCxDA7z9iW2ydmmfqjs0wEzCBs79kr-p03Qgxehg-4Nf64s0ERuOaurxp2hlFiBbF-jbpW_kmoYuhjPinQdqzNyYUz7zI8_SihT0mml0T2fil5vC6zweT597qD1hCA8tO8I4dOJa9BoPPqiADKx-T1d8FDIXxQhJmrbAE5lrYnYLMGHswTpFtxMuMbGZXmNWYZFc50kHB3X7FcdUDum7yGql87uwI7Q2VLOgZpDhEzTITiMQZVtEvugMAG0LkZ7q5TBxZ1r-Taw1jE469F_qHTi6yyT_CvK8ehpn4rBwv5cA
  1. To send the encrypted request via API, refer to the sample request below.
curl --location 'https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/get' \
--header 'Content-Type: text/plain' \
--data 'eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5tdEI4ejBrT0d1MF9sMGZ3cm5rY1F5VHpRdTBjODN2aWpFTXNGNFBMeUVFQWRaNUhzOXNJM1hNYnFMeWJjR3d3bko5b2dPNGRxNlM4c1M0RURVMkdWT01NSms2anZ2TmpWNU5xU2FnYk5qdXViOVNTZVhMN2xORUE1a2lUdDE2YWZKa3g0cV96S29VMEs5TTducGotbVp3SGFxSUloeFFLVHZ5aE9OdVVzbW9xMWVQUElraVk1NldyUnFmYURIV3FTZ0pZaTF4M3hVY2U0YmFGZWtwN0twczF6aktLYWZwQVVZZGtoZ19rZ1NqX09EV3RhUkZGeXV1S2FQcTI1X3R1RUNJSUw2RmlDLWlwN2dqcDQ3S1QwdVBUdUR1Ny02R1o1elBNUXdvQnpicEw2ejE3M0FCcEowSGlLYVVOY2VlMDJaS2djbnEyOW5nc1hWejdnZzNWNUEuUmdrZGVTU09xQk8zY1V2WS51SWwtbUlseVRuckE2T0RJLUFNM0lmTTJRbFROU3Z4RlJuWG1jcWtIS2pmb1JMLVMwMS15d3FsOVE4UzVMaGVXb2RURlJVVElVTEJTUXRJVEhZRTQyVmtMWWVUTUJHSUN5eFkueXU3OFdWY1lwaUlnNmpVcGw4M1B4Zw.JhwxPx6p7SUqpS8f4eptX9bC5PdK36AUvVNWIj24igPCxDA7z9iW2ydmmfqjs0wEzCBs79kr-p03Qgxehg-4Nf64s0ERuOaurxp2hlFiBbF-jbpW_kmoYuhjPinQdqzNyYUz7zI8_SihT0mml0T2fil5vC6zweT597qD1hCA8tO8I4dOJa9BoPPqiADKx-T1d8FDIXxQhJmrbAE5lrYnYLMGHswTpFtxMuMbGZXmNWYZFc50kHB3X7FcdUDum7yGql87uwI7Q2VLOgZpDhEzTITiMQZVtEvugMAG0LkZ7q5TBxZ1r-Taw1jE469F_qHTi6yyT_CvK8ehpn4rBwv5cA'

 

Inquiry Customer Token Response


To receive customer token request responses, refer to the sample code below.

📘

Provided Sample Code

The following sample code demonstrates how to receive response data and decrypt the JWT token with key.

For decrypting the JWT token, you may also refer to the sample code here.

  1. To decrypt the response, refer to: Process JWT Request with Keys

  2. Refer to the sample response structure below. You may also check the API specifications here: Inquiry Customer Token Response Parameters

eyJhbGciOiJQUzI1NiIsImtpZCI6IjEifQ.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5INGdqdUQzLTlLdU9aWF9LQ05vUnBFRHc2eW9tSXFKSUVmckNHUzk5NXNGczRud3RKT3NoY0RDWDVSa0xNeEw2YXlyVUR5VGZMcGNiQzJwR0xYa1U4U0VVa091encxcjYyLXhrQU1QUjlUUV80VFZ0ZzVqTFAxTGxYNj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7NoA48hG7hbECb8KqGEMouSLPisLNx64-ushnn9Kv_cP-K7HKOIi7A6KbWrfZ6Mm7xBd4xQ677VgOG0MZDlkZSNrOA1XyuVpzSEUKv1ZT7PRslPVcHI38RAGVICvkXAHkA-c239xkgH6pyhzRXTmeX4Xxzq3GQ
{
	"merchantID": "458458000000000",
	"token": "261020155003189559",
	"name": "Terrance",
	"email": "[email protected]",
	"expiry": "2024-09-30",
	"accountIssuer": "HSBC Bank",
	"accountIssuerCountry": "MY",
	"accountCurrency": "MYR",
	"channelCode": "",
	"subChannelCode": "",
	"responseCode": "0000",
	"responseDesc": "Success"
}

 

Delete Customer Token Request


https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/delete
https://pgw.2c2p.com/customertoken/3.0/CustomerToken/delete

To prepare on deleting the customer token request, refer to the guidelines below.

📘

Provided Sample Code

The following sample code demonstrates how to prepare request data, generate the JWT token with key, and send the API request.

For the JWT token, you may also refer to the sample code here.

  1. To prepare the data payload for deleting the customer token request, refer to the sample structure shown below. You may also check the API specifications here: Delete Customer Token Request Parameters

  2. To generate encrypted request data, refer to this guide: Generate JWT Request with Keys

{
    "merchantID": "458458000000000",
    "token": "261020155003189559"
}
eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5wUEpBQzVzY1NpR2dORnpMTDFfRTNZN2l3aTJUdGY1TVhOU2hSNFVUTW52Vi1xb29NdjhmS0NWOG40QVMwSlkxVmY4ekhRTlRxSFN5UF9IN3Y4N1hSM2dydW1qZnctMU9ZMXJZdnFWVEZrS21OSVk1WmZrNU5wcXB0U2tnbDFGRnFUTTZGVUF4dWFpZnNCXzk4OUllSkd6R2dxX1FjYUlRQ0Z1a0t2YXkwTHgtMlplRVBfVFZkSDExQk9lS1hsYS1Zak8zYkV5TmU3ZDduNTlKVGdmWkpTYzVTNUxUT05xUTBEOTJ5cHc2ck5IdEdNSF95d0NmTVFZSTAtMDV3aFhmcU1Vai1jT2FtWmxBc2RGUVNDSDdpbkZuSmdHRWVVM2NlcnBTVnJpRHkySmo2N2h4WTR4VGUwSjZxQno0RDBFb0lhRWs5cGRER2wxUXNrWlJVNHNtb0EuVXRsdW5zZjlCTDR1V0o0RS5uR1BoYi00R2FpNS01S0dBdlRBYWRWbU1BRVJsUWJrM3gwTmg4TzdiNUFpblQtZlhwMUhodTNTdTRQRGpiaV9JYVh1dFR1NXNqSXo2bjlfYmdaazhKeXRMV0RMTUoxVDVEcWcuZ25oUC14WGo3eElnOHcwaUdMLUJkUQ.XaJgrXbXYSMYZisvRs6sZE8s8Sm0l4HJJqsDEeXlypvTBMVrDV3zA6v0qvz9RlRO0UUaCGId7szDfrYtmB0vGFsJabpfNUXFlGGcS4p0EKni5S6fo9cqCZiJ7LmlJYSmsycXEH3Q1nF-xCeT9kvsMO9SB0jyfBaluGW3Y-6lsdyq-hjGYwhlz0qMZS-1XyKpl5gTHuus9I0R-cKjqugWdoi7E3sHDILGF39KzYwUiPMm4tXLN0N5Lv9SFflklu4rkEEviu4tUveSz1AqI53ag0zImuEy3Ij54QwVmhtx_7gYja21PnDa1O3s149iXsvXiWwQ9ATWa9tkhLzrw3mbkQ
  1. To send the encrypted request via API, refer to the sample request below.
curl --location 'https://sandbox-pgw.2c2p.com/customertoken/3.0/CustomerToken/delete' \
--header 'Content-Type: text/plain' \
--data 'eyJhbGciOiJQUzI1NiJ9.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl5STZJa0V5TlRaSFEwMGlmUS5wUEpBQzVzY1NpR2dORnpMTDFfRTNZN2l3aTJUdGY1TVhOU2hSNFVUTW52Vi1xb29NdjhmS0NWOG40QVMwSlkxVmY4ekhRTlRxSFN5UF9IN3Y4N1hSM2dydW1qZnctMU9ZMXJZdnFWVEZrS21OSVk1WmZrNU5wcXB0U2tnbDFGRnFUTTZGVUF4dWFpZnNCXzk4OUllSkd6R2dxX1FjYUlRQ0Z1a0t2YXkwTHgtMlplRVBfVFZkSDExQk9lS1hsYS1Zak8zYkV5TmU3ZDduNTlKVGdmWkpTYzVTNUxUT05xUTBEOTJ5cHc2ck5IdEdNSF95d0NmTVFZSTAtMDV3aFhmcU1Vai1jT2FtWmxBc2RGUVNDSDdpbkZuSmdHRWVVM2NlcnBTVnJpRHkySmo2N2h4WTR4VGUwSjZxQno0RDBFb0lhRWs5cGRER2wxUXNrWlJVNHNtb0EuVXRsdW5zZjlCTDR1V0o0RS5uR1BoYi00R2FpNS01S0dBdlRBYWRWbU1BRVJsUWJrM3gwTmg4TzdiNUFpblQtZlhwMUhodTNTdTRQRGpiaV9JYVh1dFR1NXNqSXo2bjlfYmdaazhKeXRMV0RMTUoxVDVEcWcuZ25oUC14WGo3eElnOHcwaUdMLUJkUQ.XaJgrXbXYSMYZisvRs6sZE8s8Sm0l4HJJqsDEeXlypvTBMVrDV3zA6v0qvz9RlRO0UUaCGId7szDfrYtmB0vGFsJabpfNUXFlGGcS4p0EKni5S6fo9cqCZiJ7LmlJYSmsycXEH3Q1nF-xCeT9kvsMO9SB0jyfBaluGW3Y-6lsdyq-hjGYwhlz0qMZS-1XyKpl5gTHuus9I0R-cKjqugWdoi7E3sHDILGF39KzYwUiPMm4tXLN0N5Lv9SFflklu4rkEEviu4tUveSz1AqI53ag0zImuEy3Ij54QwVmhtx_7gYja21PnDa1O3s149iXsvXiWwQ9ATWa9tkhLzrw3mbkQ'

 

Delete Customer Token Response


To receive and process delete customer token responses, refer to the sample code below.

📘

Provided Sample Code

Receive Response Data & Decrypt JWT Token with Key
Refer sample code here.

  1. To decrypt the response, refer to: Process JWT Request with Keys

  2. Refer to the sample response structure below. You may also check the API specifications here: Delete Customer Token Response Parameter

{
	"merchantID": "458458000000000",
	"token": "261020155003189559",
	"responseCode": "0000",
	"responseDesc": "Success"
}
eyJhbGciOiJQUzI1NiIsImtpZCI6IjEifQ.ZXlKaGJHY2lPaUpTVTBFdFQwRkZVQ0lzSW1WdVl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