{"title":"Manage tokens","category":"default","creationDate":1677492840,"content":"<p>When you store your shopper's payment details with Adyen, you can use our  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Checkout API<\/a> to manage the lifecycle of your tokens to ensure that the stored payment details remain up-to-date, so that you can continue to offer your shopper's a smooth payment experiences.<\/p>\n<h2>Requirements<\/h2>\n<p>Before you begin, take into account the following requirements, limitations, and preparations.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">An <a href=\"\/pt\/online-payments\/build-your-integration\/\">online payments integration<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/api-credentials\/roles\/\">API credential roles<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have the following role(s): <ul><li markdown=\"1\"><strong>Checkout webservice role<\/strong><\/li> <li markdown=\"1\"><strong>Merchant Recurring role<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong><a href=\"\/pt\/development-resources\/webhooks\">Webhooks<\/a><\/strong><\/td>\n<td style=\"text-align: left;\">Subscribe to the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/#other-webhooks\"><strong>Recurring tokens life cycle events<\/strong> webhook<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you begin: <ul><li markdown=\"1\">Follow our guides to <a href=\"\/pt\/online-payments\">create tokens<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>After you have <a href=\"\/pt\/online-payments\/tokenization\/create-tokens\">created tokens<\/a>, you can use the Checkout API to:<\/p>\n<ul>\n<li><a href=\"#list-stored-details\">Get a list of the shopper's stored payment details<\/a>.<\/li>\n<li><a href=\"#update-stored-details\">Update stored payment details<\/a>.<\/li>\n<li><a href=\"#delete-stored-details\">Delete stored payment details<\/a>.<\/li>\n<\/ul>\n<p>When a token is updated, or deleted, you get notified with the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Tokenization webhooks<\/a>.<\/p>\n<h2 id=\"list-stored-details\">List stored payment details<\/h2>\n<p>To see all the payment details stored for a shopper, make a <strong>GET<\/strong>  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/get\/storedPaymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/storedPaymentMethods<\/a> request including the following query parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Query parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>merchantAccount<\/code><\/td>\n<td>Your merchant account name.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperReference<\/code><\/td>\n<td>Your unique identifier for the shopper.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request to get a list stored payment details'\" :id=\"''\" :code-data='[{\"language\":\"txt\",\"tabTitle\":\"\",\"content\":\"https:\\\/\\\/checkout-test.adyen.com\\\/v71\\\/storedPaymentMethods\\\/?merchantAccount=YOUR_MERCHANT_ACCOUNT\\\/&amp;shopperReference=YOUR_UNIQUE_SHOPPER_REFERENCE\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/get\/storedPaymentMethods#responses-200-storedPaymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">storedPaymentMethods<\/a> array in the response includes:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>id<\/code><\/td>\n<td>The <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-StoredPaymentMethodDetails-storedPaymentMethodId\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">storedPaymentMethodId<\/a> value that you need to make payments with the shopper's stored payment details.<\/td>\n<\/tr>\n<tr>\n<td><code>supportedRecurringProcessingModels<\/code><\/td>\n<td>Defines the type of recurring payment that the stored payment details can be used for. Possible values: <ul><li markdown=\"1\"><strong>CardOnFile<\/strong>: The stored payment details can be used to enable one-click payments, or to offer a faster checkout later.<\/li><li markdown=\"1\"><strong>UnscheduledCardOnFile<\/strong>: The stored payment details can be used for transactions that occur on a non-fixed schedule and\/or have variable amounts.<\/li><li><strong>Subscription<\/strong>: The stored payment details can be used for transactions that follow a fixed schedule, for a fixed or variable amount.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example response with stored payment details'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"storedPaymentMethods\\\": [\\n        {\\n            \\\"brand\\\": \\\"visa\\\",\\n            \\\"expiryMonth\\\": \\\"10\\\",\\n            \\\"expiryYear\\\": \\\"2020\\\",\\n            \\\"holderName\\\": \\\"SHOPPER_NAME\\\",\\n            \\\"id\\\": \\\"8415890871952836\\\",\\n            \\\"recurringProcessingModel\\\":\\\"Subscription\\\",\\n            ...\\n        }\\n    ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"update-stored-details\">Update stored details<\/h2>\n<div class=\"notices green\">\n<p>Only applicable for tokens for stored with <code>recurringProcessingModel<\/code>: <strong>CardOnFile<\/strong>. <br> On Checkout API v70 and later, updating stored details with an API request requires additional configuration on our side. Reach out to our <a href=\"https:\/\/ca-test.adyen.com\/ca\/ca\/contactUs\/support.shtml?form=other\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Support Team<\/a> to discuss your eligibility.<\/p>\n<\/div>\n<p>You can update the following fields without changing the <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments#request-paymentMethod-StoredPaymentMethodDetails-storedPaymentMethodId\" class=\"codeLabel external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">storedPaymentMethodId<\/a> of the stored payment details:<\/p>\n<table>\n<thead>\n<tr>\n<th>Field<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>expiryMonth<\/code><\/td>\n<td>The expiry month.<\/td>\n<\/tr>\n<tr>\n<td><code>expiryYear<\/code><\/td>\n<td>The expiry year.<\/td>\n<\/tr>\n<tr>\n<td><code>holderName<\/code><\/td>\n<td>The cardholder's name.<\/td>\n<\/tr>\n<tr>\n<td><code>billingAddress<\/code><\/td>\n<td>The cardholder's address.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>If the shopper has a new card number, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request to store new payment details and receive a new identifier.<\/p>\n<p>To update the <code>expiryMonth<\/code>, <code>expiryYear<\/code>, <code>holderName<\/code>, or <code>billingAddress<\/code>, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request including:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>amount.value<\/code><\/td>\n<td><strong>0<\/strong><\/td>\n<\/tr>\n<tr>\n<td><code>storedPaymentMethodId<\/code><\/td>\n<td>The token with the stored payment details.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperReference<\/code><\/td>\n<td>Your unique identifier for the shopper.<\/td>\n<\/tr>\n<tr>\n<td><code>merchantAccount<\/code><\/td>\n<td>Your merchant account name.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperInteraction<\/code><\/td>\n<td>Defines the type of shopper interaction that the stored payment details can be used for.<\/td>\n<\/tr>\n<tr>\n<td><code>recurringProcessingModel<\/code><\/td>\n<td>Defines the type of recurring payment that the stored payment details can be used for.<\/td>\n<\/tr>\n<tr>\n<td><code>reference<\/code><\/td>\n<td>The reference to uniquely identify a payment<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Also include at least one of the fields you want to update:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>expiryMonth<\/code><\/td>\n<td>The expiry month.<\/td>\n<\/tr>\n<tr>\n<td><code>expiryYear<\/code><\/td>\n<td>The expiry year.<\/td>\n<\/tr>\n<tr>\n<td><code>holderName<\/code><\/td>\n<td>The cardholder's name.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>For example, to update the cardholder name, make a  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a> request including the required fields and <code>paymentMethod.holderName<\/code>:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example of a request to update the cardholder name'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"merchantAccount\\\": \\\"ADYEN_MERCHANT_ACCOUNT\\\",\\n  \\\"shopperReference\\\": \\\"YOUR_UNIQUE_SHOPPER_ID\\\",\\n  \\\"reference\\\": \\\"YOUR_UNIQUE_REFERENCE\\\",\\n  \\\"amount\\\": {\\n    \\\"currency\\\": \\\"GBP\\\",\\n    \\\"value\\\": 0\\n  },\\n  \\\"paymentMethod\\\": {\\n      \\\"storedPaymentMethodId\\\":\\\"8415890871952836\\\",\\n      \\\"holderName\\\": \\\"NEW_SHOPPER_NAME\\\"\\n  },\\n  \\\"shopperInteraction\\\": \\\"ContAuth\\\",\\n  \\\"recurringProcessingModel\\\": \\\"Subscription\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3 id=\"updates-from-card-networks\">Updates from card networks<\/h3>\n<p>Card networks (for example, Visa and Mastercard) also send updates to your shopper's payment details. The way these updates are handled depends on the <a href=\"\/pt\/online-payments\/account-updater\">Account Updater service<\/a> you use.<\/p>\n<ul>\n<li>If you are using our <a href=\"\/pt\/online-payments\/account-updater\/real-time-account-updater#receive-card-updates-in-payment-response\">Real Time Account Updater<\/a>, you do not have to do anything to handle the updates from the card networks. The card details are automatically updated, and the token remains unchanged.<\/li>\n<li>If you are using our <a href=\"\/pt\/online-payments\/account-updater\/batch-account-updater#update-card-details\">Batch Account Updater<\/a>, then you will receive the updated card details in a batch result file. You then need to make a <a href=\"\/pt\/online-payments\/tokenization\/create-tokens\">zero-value transaction<\/a> with the updated card details.<\/li>\n<\/ul>\n<h2 id=\"delete-stored-details\">Delete stored payment details<\/h2>\n<p>You can delete a single token by its identifier, which is returned <a href=\"\/pt\/online-payments\/tokenization\/create-tokens\">when you create a token<\/a>. Alternatively, to find all tokens for a given shopper, you can <a href=\"#list-stored-details\">list stored payment details<\/a> and get the <code>id<\/code> from the relevant item in the <code>storedPaymentMethods<\/code> array.<\/p>\n<p>To delete the token, make a <strong>DELETE<\/strong>  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/delete\/storedPaymentMethods\/(storedPaymentMethodId)\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/storedPaymentMethods\/{storedPaymentMethodId}<\/a> request including the following parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter name<\/th>\n<th>Parameter type<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>storedPaymentMethodId<\/code><\/td>\n<td>Path parameter<\/td>\n<td>The unique identifier for the token you want to delete.<\/td>\n<\/tr>\n<tr>\n<td><code>merchantAccount<\/code><\/td>\n<td>Query parameter<\/td>\n<td>Your merchant account name.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperReference<\/code><\/td>\n<td>Query parameter<\/td>\n<td>Your unique identifier for the shopper.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request to delete a token'\" :id=\"'format-for-the-delete-request-5921328107'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl -X DELETE 'https:\\\/\\\/checkout-test.adyen.com\\\/v70\\\/storedPaymentMethods\\\/{storedPaymentMethodId}?merchantAccount={YOUR_MERCHANT_ACCOUNT}&amp;shopperReference={YOUR_SHOPPER_REFERENCE}' \\\\\\n--header 'X-API-Key: ADYEN_API_KEY'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v26.3.0\\nimport com.adyen.Client;\\nimport com.adyen.enums.Environment;\\nimport com.adyen.service.checkout.*;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nClient client = new Client(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\\/\\\/ Send the request\\nRecurringApi service = new RecurringApi(client);\\nservice.deleteTokenForStoredPaymentDetails(\\&quot;storedPaymentMethodId\\&quot;, \\&quot;String\\&quot;, \\&quot;String\\&quot;, null);&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v18.2.1\\nuse Adyen\\\\Client;\\nuse Adyen\\\\Environment;\\nuse Adyen\\\\Service\\\\Checkout\\\\RecurringApi;\\n\\n$client = new Client();\\n$client-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n$requestOptions['queryParams'] = array('shopperReference' =&gt; 'string', 'merchantAccount' =&gt; 'string');\\n\\n\\\/\\\/ Send the request\\n$service = new RecurringApi($client);\\n$service-&gt;deleteTokenForStoredPaymentDetails('storedPaymentMethodId', $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.Service.Checkout;\\n\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nvar config = new Config()\\n{\\n    XApiKey = \\&quot;ADYEN_API_KEY\\&quot;,\\n    Environment = Environment.Test\\n};\\nvar client = new Client(config);\\n\\n\\\/\\\/ Send the request\\nvar service = new RecurringService(client);\\nservice.DeleteTokenForStoredPaymentDetails(\\&quot;storedPaymentMethodId\\&quot;, shopperReference: \\&quot;string\\&quot;, merchantAccount: \\&quot;string\\&quot;);&quot;},{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;NodeJS (JavaScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v17.3.0\\n\\\/\\\/ Require the parts of the module you want to use\\nconst { Client, CheckoutAPI } = require('@adyen\\\/api-library');\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\ncheckoutAPI.RecurringApi.deleteTokenForStoredPaymentDetails(\\&quot;storedPaymentMethodId\\&quot;, \\&quot;string\\&quot;, \\&quot;string\\&quot;);&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.RecurringApi.DeleteTokenForStoredPaymentDetailsInput(\\&quot;storedPaymentMethodId\\&quot;)\\nreq = req.ShopperReference(\\&quot;string\\&quot;).MerchantAccount(\\&quot;string\\&quot;)\\nservice.RecurringApi.DeleteTokenForStoredPaymentDetails(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\nquery_parameters = {\\n  \\&quot;shopperReference\\&quot; : \\&quot;string\\&quot;,\\n  \\&quot;merchantAccount\\&quot; : \\&quot;string\\&quot;\\n}\\n\\n# Send the request\\nadyen.checkout.recurring_api.delete_token_for_stored_payment_details(storedPaymentMethodId=\\&quot;storedPaymentMethodId\\&quot;, query_parameters=query_parameters)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nquery_params = {\\n  :shopperReference =&gt; 'string',\\n  :merchantAccount =&gt; 'string'\\n}\\n\\n# Send the request\\nadyen.checkout.recurring_api.delete_token_for_stored_payment_details('storedPaymentMethodId', query_params: query_params)&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v17.3.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\ncheckoutAPI.RecurringApi.deleteTokenForStoredPaymentDetails(\\&quot;storedPaymentMethodId\\&quot;, \\&quot;string\\&quot;, \\&quot;string\\&quot;);&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div class=\"sc-notice note\"><div>\n<p>After you delete payment details stored with Adyen, you must also delete any remaining shopper details from your servers.<\/p>\n<\/div><\/div>\n<h2 id=\"webhooks\">Receive token lifecycle webhooks<\/h2>\n<p>While you manage tokens, you can stay informed of status changes to your tokens with the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Tokenization webhooks<\/a>. Enable the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Recurring tokens life cycle events<\/a> webhooks in your Customer Area to receive these webhooks.<\/p>\n<p>This webhook includes:<\/p>\n<ul>\n<li><code>data.storedPaymentMethodId<\/code>: the ID of the token that was created, updated, or disabled.<\/li>\n<li><code>data.shopperReference:<\/code>: Your unique shopper reference. Use this to associate the shopper with the token.<\/li>\n<li><code>eventId<\/code>: The <code>pspReference<\/code> for the payment made to store the shopper's payment details.<\/li>\n<li>\n<p><code>type<\/code>: the type of webhook. The table below lists the possible values.<\/p>\n<table>\n<thead>\n<tr>\n<th><code>type<\/code><\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td> <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><\/td>\n<td>A new token was created.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.disabled\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.disabled<\/a><\/td>\n<td>A token was disabled, this can happen when: <ul><li markdown=\"1\"><a href=\"#delete-stored-details\">You delete stored payment details<\/a>.<\/li><li markdown=\"1\">A third-party disables the payment details.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.updated\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.updated<\/a><\/td>\n<td>The stored details for a token were updated. You can <a href=\"#update-stored-details\">initiate the update<\/a>, but stored details can also be updated by, for example, <a href=\"#updates-from-card-networks\">card networks<\/a>.<\/td>\n<\/tr>\n<tr>\n<td> <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Tokenization-webhooks\/latest\/post\/recurring.token.alreadyExisting\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">recurring.token.alreadyExisting<\/a><\/td>\n<td>A create or update operation was attempted with details that match an already existing token. The <code>storedPaymentMethodId<\/code> field contains the ID of the existing token.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<\/ul>\n<p>For example, when you delete a token, you get a webhook that looks like the following:<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Token disabled webhook'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"createdAt\\\": \\\"2024-01-14T18:10:49+01:00\\\",\\n    \\\"environment\\\": \\\"test\\\",\\n    \\\"type\\\": \\\"recurring.token.disabled\\\",\\n    \\\"data\\\": {\\n        \\\"merchantAccount\\\": \\\"ADYEN_MERCHANT_ACCOUNT\\\",\\n        \\\"shopperReference\\\": \\\"YOUR_SHOPPER_REFERENCE\\\",\\n        \\\"storedPaymentMethodId\\\": \\\"M5N7TQ4TG5PFWR50\\\",\\n        \\\"type\\\": \\\"visa\\\"\\n    },\\n    \\\"eventId\\\": \\\"QBQQ9DLNRHHKGK38\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"see-also\">See also<\/h2>\n<ul>\n<li>\n <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/overview\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Checkout API<\/a>\n<\/li>\n<li><a href=\"\/pt\/online-payments\/account-updater\">Account Updater<\/a><\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/tokenization\/managing-tokens","articleFields":{"description":"Learn how to manage tokens you stored with Adyen.","id":"39949035","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"12-03-2026 15:39","feedback_component":true,"filters_component":false,"parameters":{"api_explorer_shortcode":"[api=\"Checkout\/sessions\" inlineCode=\"false\" t=\"Try it in our API Explorer.\"]","logo_1":"![](\/reuse\/development-resources\/additional-info-resources\/java-original.svg?resize=25)","example_1":"[Java Spring](https:\/\/github.com\/adyen-examples\/adyen-java-spring-online-payments\/tree\/main\/subscription-example)","logo_2":"![](\/reuse\/development-resources\/additional-info-resources\/dot-net-original.svg?resize=25)","example_2":"[.NET](https:\/\/github.com\/adyen-examples\/adyen-dotnet-online-payments\/tree\/main\/subscription-example)","logo_3":"![](\/reuse\/development-resources\/additional-info-resources\/nodejs-original.svg?resize=25)","example_3":"[Node.js](https:\/\/github.com\/adyen-examples\/adyen-node-online-payments\/tree\/main\/subscription-example)"},"decision_tree":"[]","page_id":"b8006543-4321-4a10-a313-30cc80f7eb20"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/tokenization\/managing-tokens","title":"Manage tokens","content":"When you store your shopper's payment details with Adyen, you can use our  Checkout API to manage the lifecycle of your tokens to ensure that the stored payment details remain up-to-date, so that you can continue to offer your shopper's a smooth payment experiences.\nRequirements\nBefore you begin, take into account the following requirements, limitations, and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nAn online payments integration.\n\n\nAPI credential roles\nMake sure that you have the following role(s): Checkout webservice role Merchant Recurring role\n\n\nWebhooks\nSubscribe to the Recurring tokens life cycle events webhook.\n\n\nSetup steps\nBefore you begin: Follow our guides to create tokens.\n\n\n\nHow it works\nAfter you have created tokens, you can use the Checkout API to:\n\nGet a list of the shopper's stored payment details.\nUpdate stored payment details.\nDelete stored payment details.\n\nWhen a token is updated, or deleted, you get notified with the  Tokenization webhooks.\nList stored payment details\nTo see all the payment details stored for a shopper, make a GET  \/storedPaymentMethods request including the following query parameters:\n\n\n\nQuery parameter\nDescription\n\n\n\n\nmerchantAccount\nYour merchant account name.\n\n\nshopperReference\nYour unique identifier for the shopper.\n\n\n\n\n    \n\nThe  storedPaymentMethods array in the response includes:\n\n\n\nParameter\nDescription\n\n\n\n\nid\nThe storedPaymentMethodId value that you need to make payments with the shopper's stored payment details.\n\n\nsupportedRecurringProcessingModels\nDefines the type of recurring payment that the stored payment details can be used for. Possible values: CardOnFile: The stored payment details can be used to enable one-click payments, or to offer a faster checkout later.UnscheduledCardOnFile: The stored payment details can be used for transactions that occur on a non-fixed schedule and\/or have variable amounts.Subscription: The stored payment details can be used for transactions that follow a fixed schedule, for a fixed or variable amount.\n\n\n\n\n    \n\nUpdate stored details\n\nOnly applicable for tokens for stored with recurringProcessingModel: CardOnFile.  On Checkout API v70 and later, updating stored details with an API request requires additional configuration on our side. Reach out to our Support Team to discuss your eligibility.\n\nYou can update the following fields without changing the storedPaymentMethodId of the stored payment details:\n\n\n\nField\nDescription\n\n\n\n\nexpiryMonth\nThe expiry month.\n\n\nexpiryYear\nThe expiry year.\n\n\nholderName\nThe cardholder's name.\n\n\nbillingAddress\nThe cardholder's address.\n\n\n\nIf the shopper has a new card number, make a  \/payments request to store new payment details and receive a new identifier.\nTo update the expiryMonth, expiryYear, holderName, or billingAddress, make a  \/payments request including:\n\n\n\nParameter\nDescription\n\n\n\n\namount.value\n0\n\n\nstoredPaymentMethodId\nThe token with the stored payment details.\n\n\nshopperReference\nYour unique identifier for the shopper.\n\n\nmerchantAccount\nYour merchant account name.\n\n\nshopperInteraction\nDefines the type of shopper interaction that the stored payment details can be used for.\n\n\nrecurringProcessingModel\nDefines the type of recurring payment that the stored payment details can be used for.\n\n\nreference\nThe reference to uniquely identify a payment\n\n\n\nAlso include at least one of the fields you want to update:\n\n\n\nParameter\nDescription\n\n\n\n\nexpiryMonth\nThe expiry month.\n\n\nexpiryYear\nThe expiry year.\n\n\nholderName\nThe cardholder's name.\n\n\n\nFor example, to update the cardholder name, make a  \/payments request including the required fields and paymentMethod.holderName:\n\n    \n\nUpdates from card networks\nCard networks (for example, Visa and Mastercard) also send updates to your shopper's payment details. The way these updates are handled depends on the Account Updater service you use.\n\nIf you are using our Real Time Account Updater, you do not have to do anything to handle the updates from the card networks. The card details are automatically updated, and the token remains unchanged.\nIf you are using our Batch Account Updater, then you will receive the updated card details in a batch result file. You then need to make a zero-value transaction with the updated card details.\n\nDelete stored payment details\nYou can delete a single token by its identifier, which is returned when you create a token. Alternatively, to find all tokens for a given shopper, you can list stored payment details and get the id from the relevant item in the storedPaymentMethods array.\nTo delete the token, make a DELETE  \/storedPaymentMethods\/{storedPaymentMethodId} request including the following parameters:\n\n\n\nParameter name\nParameter type\nDescription\n\n\n\n\nstoredPaymentMethodId\nPath parameter\nThe unique identifier for the token you want to delete.\n\n\nmerchantAccount\nQuery parameter\nYour merchant account name.\n\n\nshopperReference\nQuery parameter\nYour unique identifier for the shopper.\n\n\n\n\n    \n\n\nAfter you delete payment details stored with Adyen, you must also delete any remaining shopper details from your servers.\n\nReceive token lifecycle webhooks\nWhile you manage tokens, you can stay informed of status changes to your tokens with the  Tokenization webhooks. Enable the Recurring tokens life cycle events webhooks in your Customer Area to receive these webhooks.\nThis webhook includes:\n\ndata.storedPaymentMethodId: the ID of the token that was created, updated, or disabled.\ndata.shopperReference:: Your unique shopper reference. Use this to associate the shopper with the token.\neventId: The pspReference for the payment made to store the shopper's payment details.\n\ntype: the type of webhook. The table below lists the possible values.\n\n\n\ntype\nDescription\n\n\n\n\n recurring.token.created\nA new token was created.\n\n\n recurring.token.disabled\nA token was disabled, this can happen when: You delete stored payment details.A third-party disables the payment details.\n\n\n recurring.token.updated\nThe stored details for a token were updated. You can initiate the update, but stored details can also be updated by, for example, card networks.\n\n\n recurring.token.alreadyExisting\nA create or update operation was attempted with details that match an already existing token. The storedPaymentMethodId field contains the ID of the existing token.\n\n\n\n\n\nFor example, when you delete a token, you get a webhook that looks like the following:\n\n    \n\nSee also\n\n\n Checkout API\n\nAccount Updater\n","type":"page","locale":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Tokenization","lvl3":"Manage tokens"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/pt","lvl1":"https:\/\/docs.adyen.com\/pt\/online-payments","lvl2":"https:\/\/docs.adyen.com\/pt\/online-payments\/tokenization","lvl3":"\/pt\/online-payments\/tokenization\/managing-tokens"},"levels":4,"category":"Online Payments","category_color":"green","tags":["Manage","tokens"]},"articleFiles":{"format-for-the-delete-request-5921328107.js":"<p alt=\"\">format-for-the-delete-request-5921328107.js<\/p>"}}
