Skip to main content

Network Tokenization Test Cases

Once you have been provisioned for Network Tokenization in the TokenEx Test environment, the following test cases can be used to verify your implementation prior to being provisioned for Network Tokenization in the TokenEx Production environment.

Use the test card data in the table below for each scenario. As you complete each of the following test cases, document the corresponding reference numbers in each API response as described below. Technical Support will use the reference numbers to verify the successful completion of each test case.

Important Test PAN Information

TokenEx test PANs can be leveraged to verify that the call to the card brands via our Network Token endpoints are successful. However, your Payment Services Provider (PSP) or Gateway may not accept the TokenEx test PAN in their environment. Please contact your PSP/Gateway to obtain a PAN for testing on their platform.

Test Data​

Successful network token provisioning​

Replacement rule: Mastercard & Visa — replace X with 0. Mastercard expiry = any future date.

Card BrandNumberExpCVV
American ExpressAnyAnyAny
Mastercard512X342233150747AnyAny
Mastercard512X343287498758AnyAny
Mastercard51203501XXX64594AnyAny
Visa46229431231XX63912/26242
Visa46229431231XX64712/26749
Visa46229431231XX65412/26972
Visa46229431231XX66212/26344
Visa46229431231XX67X12/26306
Visa46229431231XX68812/26065
Visa46229431231XX69612/26264
Visa test PANs are one-shot

Once a network token has been successfully provisioned against one of these Visa test PANs, that PAN cannot be reset to un-provisioned to re-run a successful provisioning against it. This is a property of the test data, not a limit on token deletion — deleting a token is a supported operation (see Test 7). Treat the success PANs as a finite, one-shot resource and budget them deliberately across your test runs. Amex accepts "Any," so Amex success provisioning is effectively unlimited; Mastercard has 3 PANs and Visa has 7.

Unsuccessful network token provisioning​

Replacement rule: Amex — replace X with 0; Visa — replace X with any number. Expiry = any future date.

Card BrandPANFailure Reason
American Express370000000XXXX28CARD_NOT_ELIGIBLE
American Express3700000000XXXX2DECLINED
American Express37000000XXXX119SERVICE_UNAVAILABLE
American Express370000000XXXX36CARD_NOT_ALLOWED
Visa4000000011XXXXXXCARD_VERIFICATION_FAILED
Visa4001770011XXXXXXCARD_NOT_ELIGIBLE
Visa4010057011XXXXXXCARD_NOT_ALLOWED
Visa4010057022XXXXXX / 4020057022XXXXXXDECLINED
Visa4010057033XXXXXX / 4020057033XXXXXXSERVICE_UNAVAILABLE
Visa4010057044XXXXXX / 4020057044XXXXXXSYSTEM_ERROR
Visa4010057055XXXXXX / 4020057055XXXXXXINVALID_REQUEST

Test 1: Tokenize a PAN and security code using the Tokenize endpoint within the Network Token API​

Using a PAN & Security Code pair from the test data list, send a request to the Tokenize endpoint and ensure the following conditions in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”
  4. The "NetworkResponse.TokenizationDecision" parameter equals “APPROVED”

Provide the "ReferenceNumber" response parameter for validation.

Test 2: Tokenize a PAN using the Tokenize endpoint within the Network Token API​

Using only a PAN from the test data list, send a request to the Tokenize endpoint and ensure the following conditions in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”
  4. The "NetworkResponse.TokenizationDecision" parameter equals “APPROVED”

Provide the "ReferenceNumber" response parameter for validation.

Test 3: Generate a payment bundle using the GetPaymentBundle endpoint within the Network Token API​

Using a PAN from the test data list, generate a network token and verify the tokenization was successful.
NOTE: Alternatively, you can skip the previous step by using an existing token which is already provisioned for network tokenization, and is in an “ACTIVE” state.

Using the token generated from the previous step, generate a payment bundle by sending the appropriate request to the GetPaymentBundle endpoint and verify the following conditions are met in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”

Cryptogram generation is supported for Visa only. For Mastercard and Amex, request a token bundle (bundleMetaData: Token) instead of a cryptogram.

Provide the "ReferenceNumber" from the payment bundle response for validation.

Test 4: Generate a payment bundle with device and billing data using the GetPaymentBundle endpoint within the Network Token API (Visa)​

Using a Visa PAN from the test data list, generate a network token and verify the tokenization was successful.
NOTE: Alternatively, you can skip the previous step by using an existing Visa token which is already provisioned for network tokenization, and is in an “ACTIVE” state.

Using the token generated from the previous step, generate a payment bundle by sending a request to the GetPaymentBundle endpoint that includes the billTo fields and the deviceInfo.id and deviceInfo.ipAddress fields, and verify the following conditions are met in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”
  4. The payment bundle contains an element of type "ECOM_CRYPTOGRAM"

The device and billing data fields support Visa's Digital Commerce Authentication Program (DCAP). They apply to Visa only and are not applicable to Mastercard or American Express.

Provide the "ReferenceNumber" from the payment bundle response for validation.

Test 5: Get card metadata and assets using the GetCardMetadata endpoint within the Network Token API​

Using a PAN from the test data list, generate a network token and verify the tokenization was successful.
NOTE: Alternatively, you can skip the previous step by using an existing token which is already provisioned for network tokenization, and is in an “ACTIVE” state.

Using the token generated from the previous step, send a request to the GetCardMetadata endpoint and verify the following conditions are met in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”

Using the Asset GUIDs from the GetCardMetadata response, send requests to the GetAsset endpoint for each available asset and verify the following conditions are met in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”

Provide the "ReferenceNumber" from the successful GetCardMetadata response and each reference number for the GetAsset responses for validation.

Test 6: Retrieve the status of a token using the GetStatus endpoint within the Network Token API​

Using a PAN from the test data list, generate a network token and verify the tokenization was successful.
NOTE: Alternatively, you can use an existing token which is already provisioned for network tokenization.

Send a request to the GetStatus endpoint for the token and verify the following conditions are met in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”
  4. The "tokenState" parameter is present

Provide the "ReferenceNumber" from the successful GetStatus response for validation.

Test 7: Delete an active token using the LifecycleManagement endpoint within the Network Token API​

Using a PAN from the test data list, generate a network token and verify the tokenization was successful.
NOTE: Alternatively, you can skip the previous step by using an existing token which is already provisioned for network tokenization, and is in an “ACTIVE” state.

Using the token generated from the previous step, delete the token by sending the appropriate request to the LifecycleManagement endpoint and verify the following conditions are met in the response:

  1. The "Success" parameter equals "true"
  2. The "NetworkResponse" JSON object is not null
  3. The "NetworkResponse.StatusCode" parameter equals “0000”

Provide the "ReferenceNumber" from the successful delete response for validation.

Deletion is the only supported Lifecycle Management action.

Test 8: Verify handling of a failed tokenization using the Tokenize endpoint within the Network Token API​

Using a PAN from the Unsuccessful network token provisioning table above, send a request to the Tokenize endpoint and ensure the following conditions in the response:

  1. The "Success" parameter equals "false", or the "NetworkResponse.StatusCode" parameter is not “0000”
  2. The "NetworkResponse.TokenizationDecision" parameter is not “APPROVED”
  3. The response reflects the failure reason listed for that PAN in the table above

Repeat for each brand/failure-reason combination you need to verify in your integration's error handling. Provide the "ReferenceNumber" from each response for validation, along with the full request/response payload for each case.