Developer-resource icon

Testing tokenization

Test the tokenization with your integration and troubleshoot issues before it goes live.

You can use our tokenization feature to store payment details for transactions like automatic subscription renewal payments.

Test your integration with Adyen's tokenization features, using our test card numbers. The following steps take you through the different steps for storing, using, updating, and removing payment details.

  1. Store payment details for one-off payments
  2. Make a test one-off payment with stored payment details
  3. Store payment details for subscription payments
  4. Make a test subscription payment with stored payment details
  5. Update stored payment details
  6. Remove stored payment details

Additionally, you can optionally test Real Time Account Updater scenarios if you use the feature.

Step 1: Store payment details for one-off payments

Test storing payment details for one-off payments.

  1. Create a token with an amount of 0 (zero-auth transaction). In your API request, set the following parameters:

    Parameter Value
    shopperInteraction Ecommerce
    recurringProcessingModel CardOnFile
  2. Get the RECURRING_CONTRACT webhook.

  3. Store the token from the webhook and the shopper reference for test one-off payments.

Step 2: Make a test one-off payment

Test making a one-off payment with stored payment details.

  1. Make a test one-off payment with the token you created for testing. In your API request, set the following parameters:

    Parameter Value
    shopperInteraction ContAuth
    recurringProcessingModel CardOnFile
  2. Get the AUTHORISATION webhook.

Step 3 (optional): Store payment details for subscription payments

If you accept subscription payments, test storing payment details for subscription payments.

  1. Create a token with an amount of 0 (zero-auth transaction). In your API request, set the following parameters:

    Parameter Value
    shopperInteraction Ecommerce
    recurringProcessingModel Subscription
  2. Get the RECURRING_CONTRACT webhook.

  3. Store the token from the webhook and the shopper reference for test subscription payments.

Step 4 (optional). Make a test subscription payment

If you accept subscription payments, test making a subscription payment with stored payment details.

  1. Make a test one-off payment with the token you created for testing. In your API request, set the following parameters:

    Parameter Value
    shopperInteraction ContAuth
    recurringProcessingModel Subscription
  2. Get the AUTHORISATION webhook.

Step 5. Update stored payment details

Test updating stored payment details.

  1. Make a request to update stored payment details for one of the tokens you created for testing.
  2. Get the stored for the shopper reference you stored the token with.

Step 6. Remove stored payment details

Test deleting stored payment details. Make a request to delete stored payment details for one of the tokens you created for testing.

Real Time Account Updater scenarios

You can only use our Real Time Account Updater services if all of the following conditions are met:

  • The amount specified in the payment is not zero.
  • The shopperInteraction parameter is set to ContAuth.
  • The payment does not contain a security code (CVC/CVV/CID).

To test how different Real Time Account Updater scenarios work for your integration, use the following test card numbers and expiry dates in your payment request. The response will contain the corresponding status in the additionalData.realtimeAccountUpdaterStatus field.

Card number Expiry month/year Status
5454 5476 9908 4950 03/2030 CardChanged
5454 5418 5840 6567 Any date except 03/2030 CardExpiryChanged
5454 5415 8031 1093 03/2030 CloseAccount
4111 1131 5971 2925 03/2030 ContactCardAccountHolder

If you are not fully PCI compliant and thus unable to process raw card data, add a prefix of test_ to the credentials. For example, use "encryptedCardNumber": "test_5454547699084950". This allows you to test using encrypted card details.