{"title":"Testing tokenization","category":"default","creationDate":1779533780,"content":"<p>You can use our <a href=\"\/online-payments\/tokenization\">Tokenization feature<\/a> to store payment details for transactions like automatic subscription renewal payments.<\/p>\n<p>Test your integration with Adyen's tokenization features, using our <a href=\"\/development-resources\/test-cards-and-credentials\/test-card-numbers\/\">test card numbers<\/a>. The following steps take you through the different steps for storing, using, updating, and removing payment details.<\/p>\n<ol>\n<li><a href=\"#store-payment-details-for-one-off-payments\">Store payment details for one-off payments<\/a><\/li>\n<li><a href=\"#make-a-test-one-off-payment\">Make a test one-off payment with stored payment details<\/a><\/li>\n<li><a href=\"#store-payment-details-for-subscription-payments\">Store payment details for subscription payments<\/a><\/li>\n<li><a href=\"#make-a-test-subscription-payment\">Make a test subscription payment with stored payment details<\/a><\/li>\n<li><a href=\"#update-stored-payment-details\">Update stored payment details<\/a><\/li>\n<li><a href=\"#remove-stored-payment-details\">Remove stored payment details<\/a><\/li>\n<\/ol>\n<p>Additionally, you can optionally test <a href=\"#real-time-account-updater\">Real Time Account Updater scenarios<\/a> if you use the feature.<\/p>\n<h2 id=\"store-payment-details-for-one-off-payments\">Step 1: Store payment details for one-off payments<\/h2>\n<p>Test storing payment details for <a href=\"\/online-payments\/tokenization#recurring-payment-types\">one-off payments<\/a>.<\/p>\n<ol>\n<li>\n<p>Create a token with an amount of <strong>0<\/strong> (zero-auth transaction). In your API request, set the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>shopperInteraction<\/code><\/td>\n<td><span translate=\"no\"><strong>Ecommerce<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>recurringProcessingModel<\/code><\/td>\n<td><span translate=\"no\"><strong>CardOnFile<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Get the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.created<\/a> webhook.<\/p>\n<\/li>\n<li>\n<p>Store the token from the webhook and the shopper reference for test one-off payments.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"make-a-test-one-off-payment\">Step 2: Make a test one-off payment<\/h2>\n<p>Test making a one-off payments with stored payment details.<\/p>\n<ol>\n<li>\n<p>Make a test one-off payment with the <a href=\"#store-payment-details-for-one-off-payments\">token you created for testing<\/a>. In your API request, set the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Value<\/th>\n<th><\/th>\n<th>Parameter<\/th>\n<th>Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>shopperInteraction<\/code><\/td>\n<td><span translate=\"no\"><strong>ContAuth<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>recurringProcessingModel<\/code><\/td>\n<td><span translate=\"no\"><strong>CardOnFile<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Get the <a href=\"\/development-resources\/webhooks\/webhook-types\/#default-event-codes\"><span translate=\"no\"><strong>AUTHORISATION<\/strong><\/span> webhook<\/a> on your server. It includes the status of the payment.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"store-payment-details-for-subscription-payments\">Step 3 (optional): Store payment details for subscription payments<\/h2>\n<p>If you accept subscription payments, test storing payment details for <a href=\"\/online-payments\/tokenization#recurring-payment-types\">subscription payments<\/a>.<\/p>\n<ol>\n<li>\n<p>Create a token with an amount of <strong>0<\/strong> (zero-auth transaction). In your API request, set the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>shopperInteraction<\/code><\/td>\n<td><span translate=\"no\"><strong>Ecommerce<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>recurringProcessingModel<\/code><\/td>\n<td><span translate=\"no\"><strong>Subscription<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Get the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.created\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.created<\/a> webhook.<\/p>\n<\/li>\n<li>\n<p>Store the token from the webhook and the shopper reference for test subscription payments.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"make-a-test-subscription-payment\">Step 4 (optional). Make a test subscription payment<\/h2>\n<p>If you accept subscription payments, test making a subscription payment with stored payment details.<\/p>\n<ol>\n<li>\n<p>Make a test one-off payment with the token you <a href=\"#store-payment-details-for-subscription-payments\">created for testing<\/a>. In your API request, set the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Value<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>shopperInteraction<\/code><\/td>\n<td><span translate=\"no\"><strong>ContAuth<\/strong><\/span><\/td>\n<\/tr>\n<tr>\n<td><code>recurringProcessingModel<\/code><\/td>\n<td><span translate=\"no\"><strong>Subscription<\/strong><\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Get the <a href=\"\/development-resources\/webhooks\/webhook-types\/#default-event-codes\"><span translate=\"no\"><strong>AUTHORISATION<\/strong><\/span> webhook<\/a> on your server. It includes the status of the payment.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"update-stored-payment-details\">Step 5. Update stored payment details<\/h2>\n<p>Test <a href=\"\/online-payments\/tokenization\/managing-tokens\/#update-stored-details\">updating stored payment details<\/a>.<\/p>\n<ol>\n<li><a href=\"\/online-payments\/tokenization\/managing-tokens\/#update-stored-details\">Make a request to update<\/a> stored payment details for one of the tokens you created for testing.<\/li>\n<li><a href=\"\/online-payments\/tokenization\/managing-tokens\/#list-stored-details\">Get the stored<\/a> for the shopper reference you stored the token with.<\/li>\n<\/ol>\n<h2 id=\"remove-stored-payment-details\">Step 6. Remove stored payment details<\/h2>\n<p>Test <a href=\"\/online-payments\/tokenization\/managing-tokens\/#delete-stored-details\">deleting stored payment details<\/a>. Make a request to delete stored payment details for one of the tokens you created for testing.<\/p>\n<h2 id=\"real-time-account-updater\">Real Time Account Updater scenarios<\/h2>\n<p>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 <code>additionalData.realtimeAccountUpdaterStatus<\/code> field.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Card number<\/th>\n<th style=\"text-align: left;\">Expiry month\/year<\/th>\n<th style=\"text-align: left;\">Status<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">5454 5476 9908 4950<\/td>\n<td style=\"text-align: left;\">03\/2030<\/td>\n<td style=\"text-align: left;\"><strong>CardChanged<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5454 5418 5840 6567<\/td>\n<td style=\"text-align: left;\">Any date except 03\/2030<\/td>\n<td style=\"text-align: left;\"><strong>CardExpiryChanged<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">5454 5415 8031 1093<\/td>\n<td style=\"text-align: left;\">03\/2030<\/td>\n<td style=\"text-align: left;\"><strong>CloseAccount<\/strong><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">4111 1131 5971 2925<\/td>\n<td style=\"text-align: left;\">03\/2030<\/td>\n<td style=\"text-align: left;\"><strong>ContactCardAccountHolder<\/strong><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"sc-notice info\"><div>\n<p>If you are not fully PCI compliant and thus unable to process raw card data, add a prefix of <code>test_<\/code> to the credentials. For example, use <code>\"encryptedCardNumber\": \"test_5454547699084950\"<\/code>. This allows you to <a href=\"\/development-resources\/test-cards-and-credentials\/test-card-numbers#test-encrypted-card-details\">test using encrypted card details<\/a>.<\/p>\n<\/div><\/div>","url":"https:\/\/docs.adyen.com\/development-resources\/testing\/tokenization","articleFields":{"description":"Test the tokenization with your integration and troubleshoot issues before it goes live.","cache_enable":false},"algolia":{"url":"https:\/\/docs.adyen.com\/development-resources\/testing\/tokenization","title":"Testing tokenization","content":"You can use our Tokenization feature to store payment details for transactions like automatic subscription renewal payments.\nTest 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.\n\nStore payment details for one-off payments\nMake a test one-off payment with stored payment details\nStore payment details for subscription payments\nMake a test subscription payment with stored payment details\nUpdate stored payment details\nRemove stored payment details\n\nAdditionally, you can optionally test Real Time Account Updater scenarios if you use the feature.\nStep 1: Store payment details for one-off payments\nTest storing payment details for one-off payments.\n\n\nCreate a token with an amount of 0 (zero-auth transaction). In your API request, set the following parameters:\n\n\n\nParameter\nValue\n\n\n\n\nshopperInteraction\nEcommerce\n\n\nrecurringProcessingModel\nCardOnFile\n\n\n\n\n\nGet the  recurring.token.created webhook.\n\n\nStore the token from the webhook and the shopper reference for test one-off payments.\n\n\nStep 2: Make a test one-off payment\nTest making a one-off payments with stored payment details.\n\n\nMake a test one-off payment with the token you created for testing. In your API request, set the following parameters:\n\n\n\nParameter\nValue\n\nParameter\nValue\n\n\n\n\nshopperInteraction\nContAuth\n\n\nrecurringProcessingModel\nCardOnFile\n\n\n\n\n\nGet the AUTHORISATION webhook on your server. It includes the status of the payment.\n\n\nStep 3 (optional): Store payment details for subscription payments\nIf you accept subscription payments, test storing payment details for subscription payments.\n\n\nCreate a token with an amount of 0 (zero-auth transaction). In your API request, set the following parameters:\n\n\n\nParameter\nValue\n\n\n\n\nshopperInteraction\nEcommerce\n\n\nrecurringProcessingModel\nSubscription\n\n\n\n\n\nGet the  recurring.token.created webhook.\n\n\nStore the token from the webhook and the shopper reference for test subscription payments.\n\n\nStep 4 (optional). Make a test subscription payment\nIf you accept subscription payments, test making a subscription payment with stored payment details.\n\n\nMake a test one-off payment with the token you created for testing. In your API request, set the following parameters:\n\n\n\nParameter\nValue\n\n\n\n\nshopperInteraction\nContAuth\n\n\nrecurringProcessingModel\nSubscription\n\n\n\n\n\nGet the AUTHORISATION webhook on your server. It includes the status of the payment.\n\n\nStep 5. Update stored payment details\nTest updating stored payment details.\n\nMake a request to update stored payment details for one of the tokens you created for testing.\nGet the stored for the shopper reference you stored the token with.\n\nStep 6. Remove stored payment details\nTest deleting stored payment details. Make a request to delete stored payment details for one of the tokens you created for testing.\nReal Time Account Updater scenarios\nTo 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.\n\n\n\nCard number\nExpiry month\/year\nStatus\n\n\n\n\n5454 5476 9908 4950\n03\/2030\nCardChanged\n\n\n5454 5418 5840 6567\nAny date except 03\/2030\nCardExpiryChanged\n\n\n5454 5415 8031 1093\n03\/2030\nCloseAccount\n\n\n4111 1131 5971 2925\n03\/2030\nContactCardAccountHolder\n\n\n\n\nIf 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.\n","type":"page","locale":"en","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Development resources","lvl2":"Testing your online payments integration","lvl3":"Testing tokenization"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/development-resources","lvl2":"https:\/\/docs.adyen.com\/development-resources\/testing","lvl3":"\/development-resources\/testing\/tokenization"},"levels":4,"category":"Development Resources","category_color":"green","tags":["Testing","tokenization"]}}
