{"title":"Tokenization","category":"default","creationDate":1781186417,"content":"<p>You can store your shoppers' payment details so that they can pay without entering their payment details again. Storing payment details creates an associated token that can be used for subsequent payments.<\/p>\n<p>Because the payment session contains all the information needed to securely create and pay with tokens, Drop-in handles the sensitive payment data for you. This minimizes your <a href=\"\/development-resources\/pci-dss-compliance-guide\/\">PCI DSS<\/a> scope and qualifies you for the simplest form of PCI validation <a href=\"\/development-resources\/pci-dss-compliance-guide\/saq-a-eligibility\/\">(SAQ A)<\/a>.<\/p>\n<p>You can:<\/p>\n<ul>\n<li><a href=\"#store-payment-details\">\n  <strong>Store payment details<\/strong>\n<\/a>: Create a token when the shopper makes a payment, or with a <a href=\"\/get-started-with-adyen\/adyen-glossary\/#zero-value-auth\">zero-value authorization<\/a> to verify payment details without collecting a payment.<\/li>\n<li><a href=\"#make-a-one-click-payment\">\n  <strong>Make a one-click payment<\/strong>\n<\/a>: Use the token for shopper-initiated payments where the returning shopper uses their stored payment details for a faster checkout.<\/li>\n<\/ul>\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;\">A <a href=\"\/standard\/integration\">standard integration<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>API credential roles<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have the following roles: <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>Webhooks<\/strong><\/td>\n<td style=\"text-align: left;\">Subscribe to the <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\"><strong>Recurring tokens life cycle events<\/strong> webhook type<\/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\"><a href=\"\/payment-methods\/add-payment-methods\">Add the payment methods<\/a> that <a href=\"\/payment-methods\/?features%5B0%5D=recurring\">support recurring payments<\/a>.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>The following diagrams show the flow for storing payment details and making a one-click payment.<\/p>\n<p>Storing payment details:<\/p>\n<ol>\n<li>The shopper proceeds to checkout on your website.<\/li>\n<li>Your server creates a payment session with additional tokenization parameters. Adyen returns session data.<\/li>\n<li>Your client website creates an instance of <code>AdyenCheckout<\/code> and initializes Drop-in with the session data.<\/li>\n<li>The shopper selects their payment method, selects the checkbox to store their payment details, and submits their payment. Drop-in handles the payment flow.<\/li>\n<li>Adyen authorizes the payment and creates a token for the shopper's payment details.<\/li>\n<li>Your webhook server receives a webhook message with the token associated with the shopper's stored payment details. <\/li>\n<li>You store the token and the shopper reference in your database.<\/li>\n<\/ol>\n<div id=\"mermaid-6a2ac62d523d8-wrapper\"><div id=\"mermaid-6a2ac62d523d8\" class=\"mermaid-shortcode loading\">CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgQ2xpZW50IGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNlcnZlciBhcyBZb3VyIHBheW1lbnQgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBZHllbgogICAgcGFydGljaXBhbnQgV2ViaG9vayBhcyBZb3VyIHdlYmhvb2sgc2VydmVyCgogICAgU2hvcHBlci0+PkNsaWVudDogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgQ2xpZW50LT4+U2VydmVyOiBUcmlnZ2VyIHJlcXVlc3QgZm9yIHBheW1lbnQgc2Vzc2lvbgogICAgU2VydmVyLT4+QWR5ZW46IDIuIENyZWF0ZSBwYXltZW50IHNlc3Npb24gd2l0aCB0b2tlbml6YXRpb24gcGFyYW1ldGVycyAoUE9TVCAvc2Vzc2lvbnMpCiAgICBBZHllbi0tPj5TZXJ2ZXI6IFNlc3Npb24gZGF0YQogICAgU2VydmVyLT4+Q2xpZW50OiBQYXNzIHNlc3Npb24gZGF0YQogICAgQ2xpZW50LT4+Q2xpZW50OiAzLiBDcmVhdGUgaW5zdGFuY2Ugb2YgQWR5ZW5DaGVja291dCBhbmQgaW5pdGlhbGl6ZSBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiBTaG93IHBheW1lbnQgVUkKICAgIFNob3BwZXItPj5DbGllbnQ6IDQuIFNlbGVjdCBwYXltZW50IG1ldGhvZCwgY29uc2VudCB0byBzdG9yZSBkZXRhaWxzLCBhbmQgc3VibWl0IHBheW1lbnQKICAgIENsaWVudC0+PkFkeWVuOiBEcm9wLWluIGhhbmRsZXMgdGhlIHBheW1lbnQgZmxvdwogICAgQWR5ZW4tPj5BZHllbjogNS4gQXV0aG9yaXplIHBheW1lbnQgYW5kIGNyZWF0ZSB0b2tlbgogICAgQWR5ZW4tPj5XZWJob29rOiA2LiBXZWJob29rIG1lc3NhZ2Ugd2l0aCB0b2tlbiAocmVjdXJyaW5nVG9rZW5DcmVhdGVkKQogICAgV2ViaG9vay0+PldlYmhvb2s6IDcuIFN0b3JlIHRva2VuIGFuZCBzaG9wcGVyIHJlZmVyZW5jZQo=<\/div><\/div>\n<p>Making a one-click payment:<\/p>\n<ol>\n<li>The shopper proceeds to checkout on your website.<\/li>\n<li>Your server creates a payment session with additional tokenization parameters. Adyen returns session data.<\/li>\n<li>Your client website creates an instance of <code>AdyenCheckout<\/code> and initializes Drop-in with the session data.<\/li>\n<li>The shopper selects their stored payment method and submits the payment. Drop-in handles the payment flow.<\/li>\n<li>Your webhook server receives a webhook message with the outcome of the payment.<\/li>\n<\/ol>\n<div id=\"mermaid-6a2ac62d523dc-wrapper\"><div id=\"mermaid-6a2ac62d523dc\" class=\"mermaid-shortcode loading\">CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgQ2xpZW50IGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNlcnZlciBhcyBZb3VyIHBheW1lbnQgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBZHllbgogICAgcGFydGljaXBhbnQgV2ViaG9vayBhcyBZb3VyIHdlYmhvb2sgc2VydmVyCgogICAgU2hvcHBlci0+PkNsaWVudDogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgQ2xpZW50LT4+U2VydmVyOiBUcmlnZ2VyIHJlcXVlc3QgZm9yIHBheW1lbnQgc2Vzc2lvbgogICAgU2VydmVyLT4+QWR5ZW46IDIuIENyZWF0ZSBwYXltZW50IHNlc3Npb24gd2l0aCB0b2tlbml6YXRpb24gcGFyYW1ldGVycyAoUE9TVCAvc2Vzc2lvbnMpCiAgICBBZHllbi0tPj5TZXJ2ZXI6IFNlc3Npb24gZGF0YQogICAgU2VydmVyLT4+Q2xpZW50OiBQYXNzIHNlc3Npb24gZGF0YQogICAgQ2xpZW50LT4+Q2xpZW50OiAzLiBDcmVhdGUgaW5zdGFuY2Ugb2YgQWR5ZW5DaGVja291dCBhbmQgaW5pdGlhbGl6ZSBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiBTaG93IHN0b3JlZCBwYXltZW50IG1ldGhvZHMKICAgIFNob3BwZXItPj5DbGllbnQ6IDQuIFNlbGVjdCBzdG9yZWQgcGF5bWVudCBtZXRob2QgYW5kIHN1Ym1pdCBwYXltZW50CiAgICBDbGllbnQtPj5BZHllbjogRHJvcC1pbiBoYW5kbGVzIHRoZSBwYXltZW50IGZsb3cKICAgIEFkeWVuLS0+PkNsaWVudDogUmVzdWx0IG9mIHRoZSBwYXltZW50IHNlc3Npb24KICAgIEFkeWVuLT4+V2ViaG9vazogNS4gV2ViaG9vayBtZXNzYWdlIHdpdGggcGF5bWVudCBvdXRjb21lCg==<\/div><\/div>\n<h2 id=\"store-payment-details\">Store payment details<\/h2>\n<p>To store your shopper's payment details and get a token that you can use for future payments:<\/p>\n<ol>\n<li>Before the shopper pays on your website, ask for their consent to store their payment details for future payments.<\/li>\n<li><a href=\"#create-a-session-with-tokenization-parameters\">Create a session with tokenization parameters<\/a>.<\/li>\n<li><a href=\"#get-the-token-from-the-webhook\">Get the token from the webhook<\/a>.<\/li>\n<\/ol>\n<h3>Create a session with tokenization parameters<\/h3>\n<p>When the shopper proceeds to make a payment, <a href=\"\/standard\/integration\/drop-in#create-payment-session\">create a session<\/a> and include the following additional parameters for tokenization:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>shopperInteraction<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Indicates the sales channel through which the shopper gives their card details. Set to <strong>Ecommerce<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>recurringProcessingModel<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The type of recurring payment the token is intended for. Set to <strong>CardOnFile<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>storePaymentMethodMode<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Indicates if the shopper's payment details will be stored. <br> <strong>Possible values:<\/strong> <ul><li markdown=\"1\"><strong>askForConsent<\/strong>: The payment form shows a checkbox that the shopper can select to store their payment details. We create an associated token.<\/li><li markdown=\"1\"><strong>enabled<\/strong>: Store the payment details and create an associated token, without showing a checkbox in the payment form.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>To store the shopper's payment details without collecting a payment, you can use a zero-value authorization: set the <code>amount.value<\/code> to <strong>0<\/strong> to verify the payment details. If you want to store the payment details as part of an actual transaction, use the amount for the current transaction.<\/p>\n<p><div class=\"sc-notice info\"><div>Some payment methods, like <a href=\"\/payment-methods\/ideal\/\">iDEAL<\/a>, require a minimum amount more than <strong>0<\/strong>.<\/div><\/div><\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example request for a session that creates a token'\" :id=\"'create-token-session'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/sessions \\\\\\n-X POST \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: 1000,\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n  },\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;Your-payment-reference-123-abc\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;NL\\&quot;,\\n  \\&quot;channel\\&quot;: \\&quot;Web\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@example.com\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;Ecommerce\\&quot;,\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;CardOnFile\\&quot;,\\n  \\&quot;storePaymentMethodMode\\&quot;: \\&quot;enabled\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The token is created after a successful payment authorization to ensure that the shopper's payment details are linked to an active account that can be charged.<\/p>\n<h3>Get the token from the webhook<\/h3>\n<p>After the transaction is authorized, you receive a  <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 with the token you can use for future payments. Store the <code>storedPaymentMethodId<\/code> together with the <code>shopperReference<\/code>, so that you associate the token with the shopper.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example token created webhook'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"createdAt\\\": \\\"2024-01-14T18:10:49+01:00\\\",\\n    \\\"environment\\\": \\\"test\\\",\\n    \\\"type\\\": \\\"recurring.token.created\\\",\\n    \\\"data\\\": {\\n        \\\"merchantAccount\\\": \\\"ADYEN_MERCHANT_ACCOUNT\\\",\\n        \\\"storedPaymentMethodId\\\": \\\"M5N7TQ4TG5PFWR50\\\",\\n        \\\"type\\\": \\\"visa\\\",\\n        \\\"operation\\\": \\\"created\\\",\\n        \\\"shopperReference\\\": \\\"YOUR_SHOPPER_REFERENCE\\\"\\n    },\\n    \\\"eventId\\\": \\\"QBQQ9DLNRHHKGK38\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>To receive these updates, enable the <a href=\"\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Recurring tokens life cycle events<\/a> webhook. We recommend that you <a href=\"\/development-resources\/webhooks\/#set-up-webhooks-in-your-customer-area\">set up the webhook<\/a> with all default events.<\/p>\n<h2 id=\"make-a-one-click-payment\">Make a one-click payment<\/h2>\n<p>After you have stored a shopper's payment details, you can use the token for one-click payments where the returning shopper uses their stored payment details for a faster checkout.<\/p>\n<ol>\n<li>\n<p>From your server, make a POST  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/sessions\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/sessions<\/a> request including:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>shopperReference<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Your unique identifier for the shopper. We use it to check if you have stored payment details associated with this shopper.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>shopperInteraction<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">Indicates the sales channel through which the shopper uses the stored payment details. Set to <strong>Ecommerce<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>recurringProcessingModel<\/code><\/td>\n<td style=\"text-align: center;\"><span class=\"hint--bottom\" data-hint=\"Required\" markdown=\"1\"><img style=\"width: 25px;\" alt=\"Required\" src=\"\/user\/pages\/reuse\/image-library\/01.icons\/required\/required.svg?decoding=auto&amp;fetchpriority=auto\" \/><\/span><\/td>\n<td style=\"text-align: left;\">The type of recurring payment. Set to <strong>CardOnFile<\/strong>. If you set this to any other value, we internally change it to <strong>CardOnFile<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices yellow\">\n<p>If you use 3D Secure for PSD2 SCA compliance, some issuing banks require SCA for <strong>ContAuth<\/strong> with <strong>CardOnFile<\/strong> transactions. See the <a href=\"\/online-payments\/psd2-sca-compliance-and-implementation-guide#are-my-payments-affected\">PSD2 SCA compliance guide<\/a> for more information.<\/p>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example request for a session with a one-click payment'\" :id=\"'pay-with-token-session'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/sessions \\\\\\n-X POST \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H 'idempotency-key: YOUR_IDEMPOTENCY_KEY' \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;: \\&quot;ADYEN_MERCHANT_ACCOUNT\\&quot;,\\n  \\&quot;amount\\&quot;: {\\n    \\&quot;value\\&quot;: 2000,\\n    \\&quot;currency\\&quot;: \\&quot;EUR\\&quot;\\n  },\\n  \\&quot;returnUrl\\&quot;: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  \\&quot;reference\\&quot;: \\&quot;Your-payment-reference-123-abc\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;NL\\&quot;,\\n  \\&quot;channel\\&quot;: \\&quot;Web\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;YOUR_SHOPPER_REFERENCE\\&quot;,\\n  \\&quot;shopperInteraction\\&quot;: \\&quot;ContAuth\\&quot;,\\n  \\&quot;recurringProcessingModel\\&quot;: \\&quot;CardOnFile\\&quot;\\n}'&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>If the shopper selects the option to pay with their stored payment details, Drop-in handles the payment flow.<\/p>\n<\/li>\n<li>\n<p>Get the outcome of the payment in a webhook message.<\/p>\n<\/li>\n<\/ol>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Follow our <a href=\"\/development-resources\/testing\/tokenization\/\">testing guide for tokenization<\/a> and make sure that you can successfully store payment details and make payments with a token.<\/p>\n<p>When you are ready to go live:<\/p>\n<ul>\n<li>Enable the <strong>Recurring tokens life cycle events<\/strong> webhooks in your <a href=\"https:\/\/ca-live.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">live Customer Area<\/a>.<\/li>\n<li>Follow the <a href=\"\/online-payments\/go-live-checklist#tokenization\">Tokenization end-to-end testing checklist<\/a>.<\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in\/tokenization","articleFields":{"description":"Store and use stored payment details with our tokenization feature with Drop-in."},"algolia":{"url":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in\/tokenization","title":"Tokenization","content":"You can store your shoppers' payment details so that they can pay without entering their payment details again. Storing payment details creates an associated token that can be used for subsequent payments.\nBecause the payment session contains all the information needed to securely create and pay with tokens, Drop-in handles the sensitive payment data for you. This minimizes your PCI DSS scope and qualifies you for the simplest form of PCI validation (SAQ A).\nYou can:\n\n\n  Store payment details\n: Create a token when the shopper makes a payment, or with a zero-value authorization to verify payment details without collecting a payment.\n\n  Make a one-click payment\n: Use the token for shopper-initiated payments where the returning shopper uses their stored payment details for a faster checkout.\n\nRequirements\nBefore you begin, take into account the following requirements, limitations, and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nA standard integration.\n\n\nAPI credential roles\nMake sure that you have the following roles: Checkout webservice roleMerchant Recurring role\n\n\nWebhooks\nSubscribe to the Recurring tokens life cycle events webhook type.\n\n\nSetup steps\nBefore you begin: Add the payment methods that support recurring payments.\n\n\n\nHow it works\nThe following diagrams show the flow for storing payment details and making a one-click payment.\nStoring payment details:\n\nThe shopper proceeds to checkout on your website.\nYour server creates a payment session with additional tokenization parameters. Adyen returns session data.\nYour client website creates an instance of AdyenCheckout and initializes Drop-in with the session data.\nThe shopper selects their payment method, selects the checkbox to store their payment details, and submits their payment. Drop-in handles the payment flow.\nAdyen authorizes the payment and creates a token for the shopper's payment details.\nYour webhook server receives a webhook message with the token associated with the shopper's stored payment details. \nYou store the token and the shopper reference in your database.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgQ2xpZW50IGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNlcnZlciBhcyBZb3VyIHBheW1lbnQgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBZHllbgogICAgcGFydGljaXBhbnQgV2ViaG9vayBhcyBZb3VyIHdlYmhvb2sgc2VydmVyCgogICAgU2hvcHBlci0+PkNsaWVudDogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgQ2xpZW50LT4+U2VydmVyOiBUcmlnZ2VyIHJlcXVlc3QgZm9yIHBheW1lbnQgc2Vzc2lvbgogICAgU2VydmVyLT4+QWR5ZW46IDIuIENyZWF0ZSBwYXltZW50IHNlc3Npb24gd2l0aCB0b2tlbml6YXRpb24gcGFyYW1ldGVycyAoUE9TVCAvc2Vzc2lvbnMpCiAgICBBZHllbi0tPj5TZXJ2ZXI6IFNlc3Npb24gZGF0YQogICAgU2VydmVyLT4+Q2xpZW50OiBQYXNzIHNlc3Npb24gZGF0YQogICAgQ2xpZW50LT4+Q2xpZW50OiAzLiBDcmVhdGUgaW5zdGFuY2Ugb2YgQWR5ZW5DaGVja291dCBhbmQgaW5pdGlhbGl6ZSBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiBTaG93IHBheW1lbnQgVUkKICAgIFNob3BwZXItPj5DbGllbnQ6IDQuIFNlbGVjdCBwYXltZW50IG1ldGhvZCwgY29uc2VudCB0byBzdG9yZSBkZXRhaWxzLCBhbmQgc3VibWl0IHBheW1lbnQKICAgIENsaWVudC0+PkFkeWVuOiBEcm9wLWluIGhhbmRsZXMgdGhlIHBheW1lbnQgZmxvdwogICAgQWR5ZW4tPj5BZHllbjogNS4gQXV0aG9yaXplIHBheW1lbnQgYW5kIGNyZWF0ZSB0b2tlbgogICAgQWR5ZW4tPj5XZWJob29rOiA2LiBXZWJob29rIG1lc3NhZ2Ugd2l0aCB0b2tlbiAocmVjdXJyaW5nVG9rZW5DcmVhdGVkKQogICAgV2ViaG9vay0+PldlYmhvb2s6IDcuIFN0b3JlIHRva2VuIGFuZCBzaG9wcGVyIHJlZmVyZW5jZQo=\nMaking a one-click payment:\n\nThe shopper proceeds to checkout on your website.\nYour server creates a payment session with additional tokenization parameters. Adyen returns session data.\nYour client website creates an instance of AdyenCheckout and initializes Drop-in with the session data.\nThe shopper selects their stored payment method and submits the payment. Drop-in handles the payment flow.\nYour webhook server receives a webhook message with the outcome of the payment.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgQ2xpZW50IGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNlcnZlciBhcyBZb3VyIHBheW1lbnQgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBZHllbgogICAgcGFydGljaXBhbnQgV2ViaG9vayBhcyBZb3VyIHdlYmhvb2sgc2VydmVyCgogICAgU2hvcHBlci0+PkNsaWVudDogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgQ2xpZW50LT4+U2VydmVyOiBUcmlnZ2VyIHJlcXVlc3QgZm9yIHBheW1lbnQgc2Vzc2lvbgogICAgU2VydmVyLT4+QWR5ZW46IDIuIENyZWF0ZSBwYXltZW50IHNlc3Npb24gd2l0aCB0b2tlbml6YXRpb24gcGFyYW1ldGVycyAoUE9TVCAvc2Vzc2lvbnMpCiAgICBBZHllbi0tPj5TZXJ2ZXI6IFNlc3Npb24gZGF0YQogICAgU2VydmVyLT4+Q2xpZW50OiBQYXNzIHNlc3Npb24gZGF0YQogICAgQ2xpZW50LT4+Q2xpZW50OiAzLiBDcmVhdGUgaW5zdGFuY2Ugb2YgQWR5ZW5DaGVja291dCBhbmQgaW5pdGlhbGl6ZSBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiBTaG93IHN0b3JlZCBwYXltZW50IG1ldGhvZHMKICAgIFNob3BwZXItPj5DbGllbnQ6IDQuIFNlbGVjdCBzdG9yZWQgcGF5bWVudCBtZXRob2QgYW5kIHN1Ym1pdCBwYXltZW50CiAgICBDbGllbnQtPj5BZHllbjogRHJvcC1pbiBoYW5kbGVzIHRoZSBwYXltZW50IGZsb3cKICAgIEFkeWVuLS0+PkNsaWVudDogUmVzdWx0IG9mIHRoZSBwYXltZW50IHNlc3Npb24KICAgIEFkeWVuLT4+V2ViaG9vazogNS4gV2ViaG9vayBtZXNzYWdlIHdpdGggcGF5bWVudCBvdXRjb21lCg==\nStore payment details\nTo store your shopper's payment details and get a token that you can use for future payments:\n\nBefore the shopper pays on your website, ask for their consent to store their payment details for future payments.\nCreate a session with tokenization parameters.\nGet the token from the webhook.\n\nCreate a session with tokenization parameters\nWhen the shopper proceeds to make a payment, create a session and include the following additional parameters for tokenization:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nshopperInteraction\n\nIndicates the sales channel through which the shopper gives their card details. Set to Ecommerce.\n\n\nrecurringProcessingModel\n\nThe type of recurring payment the token is intended for. Set to CardOnFile.\n\n\nstorePaymentMethodMode\n\nIndicates if the shopper's payment details will be stored.  Possible values: askForConsent: The payment form shows a checkbox that the shopper can select to store their payment details. We create an associated token.enabled: Store the payment details and create an associated token, without showing a checkbox in the payment form.\n\n\n\nTo store the shopper's payment details without collecting a payment, you can use a zero-value authorization: set the amount.value to 0 to verify the payment details. If you want to store the payment details as part of an actual transaction, use the amount for the current transaction.\nSome payment methods, like iDEAL, require a minimum amount more than 0.\n\n    \n\nThe token is created after a successful payment authorization to ensure that the shopper's payment details are linked to an active account that can be charged.\nGet the token from the webhook\nAfter the transaction is authorized, you receive a  recurring.token.created webhook with the token you can use for future payments. Store the storedPaymentMethodId together with the shopperReference, so that you associate the token with the shopper.\n\n    \n\nTo receive these updates, enable the Recurring tokens life cycle events webhook. We recommend that you set up the webhook with all default events.\nMake a one-click payment\nAfter you have stored a shopper's payment details, you can use the token for one-click payments where the returning shopper uses their stored payment details for a faster checkout.\n\n\nFrom your server, make a POST  \/sessions request including:\n\n\n\nParameter\nRequired\nDescription\n\n\n\n\nshopperReference\n\nYour unique identifier for the shopper. We use it to check if you have stored payment details associated with this shopper.\n\n\nshopperInteraction\n\nIndicates the sales channel through which the shopper uses the stored payment details. Set to Ecommerce.\n\n\nrecurringProcessingModel\n\nThe type of recurring payment. Set to CardOnFile. If you set this to any other value, we internally change it to CardOnFile.\n\n\n\n\nIf you use 3D Secure for PSD2 SCA compliance, some issuing banks require SCA for ContAuth with CardOnFile transactions. See the PSD2 SCA compliance guide for more information.\n\n\n\n\n\n\nIf the shopper selects the option to pay with their stored payment details, Drop-in handles the payment flow.\n\n\nGet the outcome of the payment in a webhook message.\n\n\nTest and go live\nFollow our testing guide for tokenization and make sure that you can successfully store payment details and make payments with a token.\nWhen you are ready to go live:\n\nEnable the Recurring tokens life cycle events webhooks in your live Customer Area.\nFollow the Tokenization end-to-end testing checklist.\n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Standard payments integration","lvl2":"Build your integration","lvl3":"Drop-in","lvl4":"Tokenization"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/standard","lvl2":"https:\/\/docs.adyen.com\/standard\/integration","lvl3":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in","lvl4":"\/standard\/integration\/drop-in\/tokenization"},"levels":5,"category":"","category_color":"","tags":["Tokenization"]}}
