{"title":"Create tokens","category":"default","creationDate":1690550520,"content":"<p>To tokenize your shopper's payment details, you need to include additional fields when you make an API request to create a payment session or make a payment. When the details are successfully tokenized, you receive a webhook that contains the token you can use for subsequent payments.<\/p>\n<p>You can tokenize your shopper's payment details when they pay for a purchase, or with a <a href=\"\/pt\/get-started-with-adyen\/adyen-glossary\/#zero-value-auth\">zero-value auth<\/a>.<\/p>\n<p>If you already have existing recurring contracts with another payment service provider, you can <a href=\"#import-stored-payment-details\">import the stored payment details<\/a> to Adyen.<\/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 roles: <ul><li markdown=\"1\"><strong>Checkout webservice role<\/strong><\/li> <li markdown=\"1\"><strong>Merchant Recurring role<\/strong><\/li><\/ul> Only if you want to use the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/storedPaymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/storedPaymentMethods<\/a> endpoint: <ul><li markdown=\"1\"><strong>API tokenise payment details<\/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>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\">With the  <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> endpoint, you can create tokens for all <a href=\"\/pt\/online-payments\/tokenization#recurring-payment-types\">recurring payment types<\/a>, but making subsequent subscription or unscheduled card-on-file payments require using the  <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> endpoint.<\/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=\"\/pt\/payment-methods\/add-payment-methods\">Add the payment methods<\/a> that <a href=\"\/pt\/payment-methods\/?features%5B0%5D=recurring\">support recurring payments<\/a> in your Customer Area.<\/li><li markdown=\"1\">Set up your <a href=\"\/pt\/online-payments\/build-your-integration\/\">online payments integration<\/a>.<\/li> <li markdown=\"1\">If you are implementing 3D Secure for PSD2 SCA compliance, <a href=\"\/pt\/online-payments\/psd2-sca-compliance-and-implementation-guide#are-my-payments-affected\">use our self-service guide<\/a> to find out about the PSD2 SCA compliance rules that apply to your business when tokenizing shopper payment details.<\/li> <li markdown=\"1\">Review <a href=\"\/pt\/online-payments\/psd2-sca-compliance-and-implementation-guide\/business-models-overview\">additional SCA requirements based on business models<\/a> that can apply to you, depending on your tokenization implementation.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>How it works<\/h2>\n<p>To store your shoppers payment details and get a token that you can use for future payments:<\/p>\n<ol>\n<li><a href=\"#enable-the-webhook\">Enable the <strong>Recurring tokens life cycle events<\/strong> webhook<\/a>.<\/li>\n<li>Before the shopper pays on your website or app, ask for their consent to store their payment details for future payments. You must inform the shopper about the payment schedule and the amount that you will charge to reduce the risk of chargebacks.<\/li>\n<li>In your payment request, include <a href=\"#set-parameters-to-flag-transactions\">tokenization parameters<\/a> to <a href=\"#create-a-token\">create a token<\/a> with the shopper's payment details. Multiple endpoints support tokenizing your shopper's payment details:\n<ul>\n<li><strong>POST<\/strong>  <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>: the simplest way to create tokens. The payment session contains all the information needed to collect payment details securely. This reduces your <a href=\"\/pt\/development-resources\/pci-dss-compliance-guide\/saq-a-eligibility\/\">PCI scope to the simplest level (SAQ A)<\/a>.<\/li>\n<li><strong>POST<\/strong>  <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>: lets you have more control over the checkout experience, and lets you handle more complex payment flows where you need to manage the state and data flow yourself.<\/li>\n<li><strong>POST<\/strong>  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/storedPaymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/storedPaymentMethods<\/a>: Only available on Checkout API v70 and later. Lets you create tokens without an authorization. We recommend to create tokens with an authorization, to make sure the tokens you create are linked to active, chargeable accounts.<\/li>\n<\/ul><\/li>\n<li>After the transaction is authorized, get the unique identifier and other information about the token from 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.<\/li>\n<\/ol>\n<h2 id=\"enable-the-webhook\">Enable the webhook<\/h2>\n<p>To get updates when a token is created, updated, or disabled, enable the <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Recurring tokens life cycle events<\/a> webhook.<\/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.<\/li>\n<li><code>eventId<\/code>: the <code>pspReference<\/code> for the transaction 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 token was <a href=\"#create-a-token\">created<\/a>. To use in future recurring payments, store the <code>storedPaymentMethodId<\/code> together with the <code>shopperReference<\/code>, so that you associate the token with the shopper.<\/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>We recommend that you <a href=\"\/pt\/development-resources\/webhooks\/#set-up-webhooks-in-your-customer-area\">set up the webhook<\/a> with all default events.<\/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\\\": \\\"YOUR_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<div class=\"notices yellow\">\n<p>We are no longer working on the development of the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/RECURRING_CONTRACT\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">RECURRING_CONTRACT<\/a> webhook. We strongly recommend to use the new <a href=\"\/pt\/development-resources\/webhooks\/webhook-types\/#other-webhooks\">Recurring tokens life cycle events<\/a> webhook instead, because it keeps you informed of more token lifecycle events. If your integration already uses the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Webhooks\/latest\/post\/RECURRING_CONTRACT\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">RECURRING_CONTRACT<\/a> webhook, the webhook remains available.<\/p>\n<\/div>\n<h2 id=\"create-a-token\">Create a token<\/h2>\n<p>Select the endpoint you are using:<\/p>\n\n<div id=\"tabwBc4m\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;&lt;code&gt;\\\/sessions&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;When the shopper proceeds to make a payment:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;Use your integration to &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/sessions-flow\\&quot;&gt;create a session&lt;\\\/a&gt;. In your  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; request, include the additional parameters for tokenization:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Parameter&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-recurringProcessingModel\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;recurringProcessingModel&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The type of recurring payment the token is intended for. &lt;br&gt; If you want to use the token for more than one type of recurring payment, use the type that is most appropriate at the time of token creation. In subsequent transactions, you can specify another &lt;code&gt;recurringProcessingModel&lt;\\\/code&gt;.  &lt;br&gt; &lt;strong&gt;Possible values&lt;\\\/strong&gt;: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;CardOnFile&lt;\\\/strong&gt;: A transaction where shopper card details are stored to enable one-click or omnichannel journeys, or to offer a faster checkout later.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;UnscheduledCardOnFile&lt;\\\/strong&gt;: A transaction that occurs on a non-fixed schedule and\\\/or have variable amounts.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;Subscription&lt;\\\/strong&gt;:  A transaction for a fixed or variable amount, which follows a fixed schedule.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-shopperInteraction\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperInteraction&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Indicates the sales channel through which the shopper gives their card details, for online transactions, this is &lt;strong&gt;Ecommerce&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-shopperReference\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperReference&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Your unique reference for the shopper. Do not include personally identifiable information (PII), such as name or email address.&lt;br&gt; &lt;strong&gt;Format:&lt;\\\/strong&gt; &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Minimum length: 3 characters.&lt;\\\/li&gt;&lt;li&gt;Case-sensitive.&lt;\\\/il&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions#request-storePaymentMethodMode\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;storePaymentMethodMode&lt;\\\/a&gt;   &lt;div data-component-wrapper=\\&quot;tag\\&quot;&gt;\\n    &lt;tag :variant=&amp;quot;warning&amp;quot;&gt;\\n        Checkout API v70 or later\\n    &lt;\\\/tag&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/td&gt;\\n&lt;td&gt;Indicates if the details of the payment method will be stored for the shopper. &lt;br&gt; &lt;strong&gt;Possible values:&lt;\\\/strong&gt; &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;disabled&lt;\\\/strong&gt; : No details will be stored (default).&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;askForConsent&lt;\\\/strong&gt;: When &lt;code&gt;shopperReference&lt;\\\/code&gt; is included, the Drop-in\\\/Component shows a checkbox where the shopper can select to store their payment details for card payments. For other payment methods, no checkbox is shown when the field is set to this value, and the payment details are not stored.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;enabled&lt;\\\/strong&gt;: When &lt;code&gt;shopperReference&lt;\\\/code&gt; is included, a token is created to store the payment details. The Drop-in\\\/Component does not display a checkbox where the shopper can select to store their payment details.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/69\\\/post\\\/sessions#request-storePaymentMethod\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;storePaymentMethod&lt;\\\/a&gt; &lt;br&gt; &lt;div data-component-wrapper=\\&quot;tag\\&quot;&gt;\\n    &lt;tag :variant=&amp;quot;warning&amp;quot;&gt;\\n        Checkout API v69 or earlier\\n    &lt;\\\/tag&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/td&gt;\\n&lt;td&gt;Indicates if the details of the payment method will be stored for the shopper. When set to &lt;strong&gt;true&lt;\\\/strong&gt; and &lt;code&gt;shopperReference&lt;\\\/code&gt; is included, a token is created to store the payment details. &lt;div class=\\&quot;sc-notice note\\&quot;&gt;&lt;div&gt; If you have a Web Drop-in\\\/Components integration with Checkout API v69 or earlier, set &lt;code&gt;enableStoreDetails&lt;\\\/code&gt; to &lt;strong&gt;true&lt;\\\/strong&gt; in your &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/cards\\\/web-component#optional-configuration\\&quot;&gt;Card configuration object&lt;\\\/a&gt; to display a checkbox where the shopper can select to store their payment details.  &lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;If you want to tokenize the shopper&#039;s payment details with a zero-value auth, set the &lt;code&gt;amount.value&lt;\\\/code&gt; to &lt;strong&gt;0&lt;\\\/strong&gt;. If you want to tokenize the payment details as part of another transaction, use the amount for the current transaction.&lt;br \\\/&gt;\\n&lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; Some payment methods, like &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/ideal\\\/\\&quot;&gt;iDEAL&lt;\\\/a&gt; do not allow &lt;strong&gt;0&lt;\\\/strong&gt;, and require a minimum amount. &lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Example \\\/sessions request to create a CardOnFile token &#039;\\&quot; :id=\\&quot;&#039;create-token-sessions&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v71\\\\\\\/sessions \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n   \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n   \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n      \\\\&amp;quot;value\\\\&amp;quot;: 100,\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;EUR\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n   \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n   \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;,\\\\n   \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;NL\\\\&amp;quot;,\\\\n   \\\\&amp;quot;storePaymentMethodMode\\\\&amp;quot;: \\\\&amp;quot;enabled\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperInteraction\\\\&amp;quot;: \\\\&amp;quot;Ecommerce\\\\&amp;quot;,\\\\n   \\\\&amp;quot;recurringProcessingModel\\\\&amp;quot;: \\\\&amp;quot;CardOnFile\\\\&amp;quot;\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;java&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Java&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Java API Library v26.3.0\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.model.checkout.*;\\\\nimport java.time.OffsetDateTime;\\\\nimport java.util.*;\\\\nimport com.adyen.model.RequestOptions;\\\\nimport com.adyen.service.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;EUR\\\\&amp;quot;)\\\\n  .value(100L);\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;)\\\\n  .storePaymentMethodMode(CreateCheckoutSessionRequest.StorePaymentMethodModeEnum.ENABLED)\\\\n  .amount(amount)\\\\n  .merchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .countryCode(\\\\&amp;quot;NL\\\\&amp;quot;)\\\\n  .recurringProcessingModel(CreateCheckoutSessionRequest.RecurringProcessingModelEnum.CARDONFILE)\\\\n  .shopperInteraction(CreateCheckoutSessionRequest.ShopperInteractionEnum.ECOMMERCE)\\\\n  .returnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;)\\\\n  .shopperReference(\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nPaymentsApi service = new PaymentsApi(client);\\\\nCreateCheckoutSessionResponse response = service.sessions(createCheckoutSessionRequest, new RequestOptions().idempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;));&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;PHP&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen PHP API Library v18.2.1\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CreateCheckoutSessionRequest;\\\\nuse Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi;\\\\n\\\\n$client = new Client();\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\n$client-&amp;gt;setEnvironment(Environment::TEST);\\\\n\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;EUR\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(100);\\\\n\\\\n$createCheckoutSessionRequest = new CreateCheckoutSessionRequest();\\\\n$createCheckoutSessionRequest\\\\n  -&amp;gt;setReference(\\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;)\\\\n  -&amp;gt;setStorePaymentMethodMode(\\\\&amp;quot;enabled\\\\&amp;quot;)\\\\n  -&amp;gt;setAmount($amount)\\\\n  -&amp;gt;setMerchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setCountryCode(\\\\&amp;quot;NL\\\\&amp;quot;)\\\\n  -&amp;gt;setRecurringProcessingModel(\\\\&amp;quot;CardOnFile\\\\&amp;quot;)\\\\n  -&amp;gt;setShopperInteraction(\\\\&amp;quot;Ecommerce\\\\&amp;quot;)\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;)\\\\n  -&amp;gt;setShopperReference(\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;);\\\\n\\\\n$requestOptions[&#039;idempotencyKey&#039;] = &#039;UUID&#039;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\n$service = new PaymentsApi($client);\\\\n$response = $service-&amp;gt;sessions($createCheckoutSessionRequest, $requestOptions);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;cs&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;C#&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen .net API Library v17.0.0\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n    Environment = Environment.Test\\\\n};\\\\nvar client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;EUR\\\\&amp;quot;,\\\\n  Value = 100\\\\n};\\\\n\\\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest\\\\n{\\\\n  Reference = \\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;,\\\\n  StorePaymentMethodMode = CreateCheckoutSessionRequest.StorePaymentMethodModeEnum.Enabled,\\\\n  Amount = amount,\\\\n  MerchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  CountryCode = \\\\&amp;quot;NL\\\\&amp;quot;,\\\\n  RecurringProcessingModel = CreateCheckoutSessionRequest.RecurringProcessingModelEnum.CardOnFile,\\\\n  ShopperInteraction = CreateCheckoutSessionRequest.ShopperInteractionEnum.Ecommerce,\\\\n  ReturnUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  ShopperReference = \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nvar service = new PaymentsService(client);\\\\nvar response = service.Sessions(createCheckoutSessionRequest, requestOptions: new RequestOptions { IdempotencyKey = \\\\&amp;quot;UUID\\\\&amp;quot;});&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;go&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Go&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Go API Library v10.4.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v9\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nclient := adyen.NewClient(&amp;amp;common.Config{\\\\n  ApiKey:      \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  Environment: common.TestEnv,\\\\n})\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;EUR\\\\&amp;quot;,\\\\n  Value: 100,\\\\n}\\\\n\\\\ncreateCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;,\\\\n  StorePaymentMethodMode: common.PtrString(\\\\&amp;quot;enabled\\\\&amp;quot;),\\\\n  Amount: amount,\\\\n  MerchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  CountryCode: common.PtrString(\\\\&amp;quot;NL\\\\&amp;quot;),\\\\n  RecurringProcessingModel: common.PtrString(\\\\&amp;quot;CardOnFile\\\\&amp;quot;),\\\\n  ShopperInteraction: common.PtrString(\\\\&amp;quot;Ecommerce\\\\&amp;quot;),\\\\n  ReturnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  ShopperReference: common.PtrString(\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;),\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nservice := client.Checkout()\\\\nreq := service.PaymentsApi.SessionsInput().IdempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;).CreateCheckoutSessionRequest(createCheckoutSessionRequest)\\\\nres, httpRes, err := service.PaymentsApi.Sessions(context.Background(), req)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;py&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Python&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Python API Library v12.5.1\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nadyen.client.platform = \\\\&amp;quot;test\\\\&amp;quot; # The environment to use library in.\\\\n\\\\n# Create the request object(s)\\\\njson_request = {\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 100,\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;EUR\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;countryCode\\\\&amp;quot;: \\\\&amp;quot;NL\\\\&amp;quot;,\\\\n  \\\\&amp;quot;storePaymentMethodMode\\\\&amp;quot;: \\\\&amp;quot;enabled\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperInteraction\\\\&amp;quot;: \\\\&amp;quot;Ecommerce\\\\&amp;quot;,\\\\n  \\\\&amp;quot;recurringProcessingModel\\\\&amp;quot;: \\\\&amp;quot;CardOnFile\\\\&amp;quot;\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.sessions(request=json_request, idempotency_key=\\\\&amp;quot;UUID\\\\&amp;quot;)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;rb&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Ruby&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Ruby API Library v9.5.1\\\\nrequire \\\\&amp;quot;adyen-ruby-api-library\\\\&amp;quot;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;ADYEN_API_KEY&#039;\\\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nadyen.env = :test # Set to \\\\&amp;quot;live\\\\&amp;quot; for live environment\\\\n\\\\n# Create the request object(s)\\\\nrequest_body = {\\\\n  :merchantAccount =&amp;gt; &#039;YOUR_MERCHANT_ACCOUNT&#039;,\\\\n  :amount =&amp;gt; {\\\\n    :value =&amp;gt; 100,\\\\n    :currency =&amp;gt; &#039;EUR&#039;\\\\n  },\\\\n  :shopperReference =&amp;gt; &#039;YOUR_SHOPPER_REFERENCE&#039;,\\\\n  :returnUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..&#039;,\\\\n  :reference =&amp;gt; &#039;YOUR_PAYMENT_REFERENCE&#039;,\\\\n  :countryCode =&amp;gt; &#039;NL&#039;,\\\\n  :storePaymentMethodMode =&amp;gt; &#039;enabled&#039;,\\\\n  :shopperInteraction =&amp;gt; &#039;Ecommerce&#039;,\\\\n  :recurringProcessingModel =&amp;gt; &#039;CardOnFile&#039;\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.sessions(request_body, headers: { &#039;Idempotency-Key&#039; =&amp;gt; &#039;UUID&#039; })&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;ts&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (TypeScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v17.3.0\\\\n\\\\\\\/\\\\\\\/ Require the parts of the module you want to use\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\\\\/\\\\\\\/ Initialize the client object\\\\n\\\\\\\/\\\\\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\\\nconst client = new Client({apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, environment: \\\\&amp;quot;TEST\\\\&amp;quot;});\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;EUR\\\\&amp;quot;,\\\\n  value: 100\\\\n};\\\\n\\\\nconst createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_PAYMENT_REFERENCE\\\\&amp;quot;,\\\\n  storePaymentMethodMode: Types.checkout.CreateCheckoutSessionRequest.StorePaymentMethodModeEnum.Enabled,\\\\n  amount: amount,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  countryCode: \\\\&amp;quot;NL\\\\&amp;quot;,\\\\n  recurringProcessingModel: Types.checkout.CreateCheckoutSessionRequest.RecurringProcessingModelEnum.CardOnFile,\\\\n  shopperInteraction: Types.checkout.CreateCheckoutSessionRequest.ShopperInteractionEnum.Ecommerce,\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\&amp;quot;,\\\\n  shopperReference: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;The token is created after a successful payment authorization to ensure that the payment details the shopper provided are linked to an active, chargeable account. The token will be linked to the &lt;code&gt;shopperReference&lt;\\\/code&gt; you provided in your  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; request. If you have previously used the same&lt;code&gt;shopperReference&lt;\\\/code&gt; value, the token will be associated with the existing shopper.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Example response after the request to create a token&#039;\\&quot; :id=\\&quot;&#039;token-created&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;bash\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n   \\\\\\&quot;amount\\\\\\&quot;: {\\\\n     \\\\\\&quot;currency\\\\\\&quot;: \\\\\\&quot;EUR\\\\\\&quot;,\\\\n     \\\\\\&quot;value\\\\\\&quot;: 100\\\\n   },\\\\n   \\\\\\&quot;countryCode\\\\\\&quot;: \\\\\\&quot;NL\\\\\\&quot;,\\\\n   \\\\\\&quot;expiresAt\\\\\\&quot;: \\\\\\&quot;2022-01-11T13:56:05+01:00\\\\\\&quot;,\\\\n   \\\\\\&quot;id\\\\\\&quot;: \\\\\\&quot;FJM726V375BV9D82\\\\\\&quot;,\\\\n   \\\\\\&quot;merchantAccount\\\\\\&quot;: \\\\\\&quot;YOUR_MERCHANT_ACCOUNT\\\\\\&quot;,\\\\n   \\\\\\&quot;recurringProcessingModel\\\\\\&quot;: \\\\\\&quot;CardOnFile\\\\\\&quot;,\\\\n   \\\\\\&quot;reference\\\\\\&quot;: \\\\\\&quot;YOUR_PAYMENT_REFERENCE\\\\\\&quot;,\\\\n   \\\\\\&quot;returnUrl\\\\\\&quot;: \\\\\\&quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/checkout?shopperOrder=12xy..\\\\\\&quot;,\\\\n   \\\\\\&quot;shopperInteraction\\\\\\&quot;: \\\\\\&quot;Ecommerce\\\\\\&quot;,\\\\n   \\\\\\&quot;storePaymentMethod\\\\\\&quot;: true,\\\\n   \\\\\\&quot;sessionData\\\\\\&quot;: \\\\\\&quot;Ab02b4c0!BQABAgBfYI29...\\\\\\&quot;\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Depending on the &lt;code&gt;recurringProcessingModel&lt;\\\/code&gt;, &lt;a href=\\&quot;\\\/pt\\\/get-started-with-adyen\\\/adyen-glossary\\\/#strong-customer-authentication-sca\\&quot;&gt;Strong Customer Authentication (SCA)&lt;\\\/a&gt; may be required. The  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/sessions\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/sessions&lt;\\\/a&gt; endpoint supports &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/3d-secure\\&quot;&gt;native 3D Secure authentication&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;&lt;strong&gt;CardOnFile&lt;\\\/strong&gt;: regulations and scheme rules may require SCA.&lt;\\\/li&gt;\\n&lt;li&gt;&lt;strong&gt;Subscription&lt;\\\/strong&gt; and &lt;strong&gt;UnscheduledCardOnFile&lt;\\\/strong&gt;: SCA is required for the initial payment.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Get the token you can use for future payments in an asynchronous &lt;a href=\\&quot;#enable-the-webhook\\&quot;&gt;Recurring tokens life cycle events&lt;\\\/a&gt; webhook with &lt;code&gt;type&lt;\\\/code&gt;:  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Tokenization-webhooks\\\/latest\\\/post\\\/recurring.token.created\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;recurring.token.created&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;sessions-create-a-token&quot;,&quot;oldTabId&quot;:&quot;sessions-create-a-token_1&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;&lt;code&gt;\\\/payments&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;When your shopper proceeds to pay:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;Use your integration to &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/advanced-flow\\&quot;&gt;make a payment&lt;\\\/a&gt;. In your  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; request, include the additional parameters for tokenization:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Parameter&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-recurringProcessingModel\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;recurringProcessingModel&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;When you first create a token, indicates what type of recurring payment the token is intended for. If you want to use the type that is most appropriate at the time of token creation. In subsequent transactions, you can specify another &lt;code&gt;recurringProcessingModel&lt;\\\/code&gt;.  &lt;br&gt; For subsequent payments, indicates the type of recurring payment. &lt;br&gt;&lt;strong&gt;Possible values:&lt;\\\/strong&gt; &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;CardOnFile&lt;\\\/strong&gt;: A transaction where shopper card details are stored to enable one-click or omnichannel journeys, or to offer a faster checkout later.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;UnscheduledCardOnFile&lt;\\\/strong&gt;: A transaction that occurs on a non-fixed schedule and\\\/or have variable amounts.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;Subscription&lt;\\\/strong&gt;:  A transaction for a fixed or variable amount, which follows a fixed schedule.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-shopperInteraction\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperInteraction&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Indicates the sales channel through which the shopper gives their card details, for online transactions, this is &lt;strong&gt;Ecommerce&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-shopperReference\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperReference&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Your unique reference for the shopper. Do not include personally identifiable information (PII), such as name or email address.&lt;br&gt; &lt;strong&gt;Format:&lt;\\\/strong&gt; &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Minimum length: 3 characters.&lt;\\\/li&gt;&lt;li&gt;Case-sensitive.&lt;\\\/il&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt; &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-storePaymentMethod\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;storePaymentMethod&lt;\\\/a&gt;&lt;\\\/td&gt;\\n&lt;td&gt;When you first create a token, set to &lt;strong&gt;true&lt;\\\/strong&gt; to store the shopper&#039;s payment details. &lt;br&gt; For subsequent payments, this parameter is not required.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;div class=\\&quot;sc-notice note\\&quot;&gt;&lt;div&gt;\\n&lt;p&gt;&lt;strong&gt;Checkout API v69 or earlier&lt;\\\/strong&gt;&lt;br \\\/&gt;\\nIf the &lt;strong&gt;Recurring toggle&lt;\\\/strong&gt; is enabled in your &lt;a href=\\&quot;https:\\\/\\\/ca-test.adyen.com\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Customer Area&lt;\\\/a&gt; &amp;gt; &lt;strong&gt;Settings&lt;\\\/strong&gt; &amp;gt; &lt;strong&gt;Checkout settings&lt;\\\/strong&gt; &amp;gt; &lt;strong&gt;Tokenization&lt;\\\/strong&gt;, you tokenize payment details automatically when  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments#request-shopperReference\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;shopperReference&lt;\\\/a&gt; is included. If you do not want this behavior, disable the toggle.&lt;\\\/p&gt;\\n&lt;\\\/div&gt;&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;If you want to tokenize the shopper&#039;s payment details with a zero-value auth, set the &lt;code&gt;amount.value&lt;\\\/code&gt; to &lt;strong&gt;0&lt;\\\/strong&gt;. If you want to tokenize the payment details as part of another transaction, use the amount for the current transaction.&lt;br \\\/&gt;\\n&lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; Keep in mind that some payment methods, like &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/ideal\\\/\\&quot;&gt;iDEAL&lt;\\\/a&gt; do not allow &lt;strong&gt;0&lt;\\\/strong&gt;, and require a minimum amount. &lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Example \\\/payments request to create a CardOnFile token&#039;\\&quot; :id=\\&quot;&#039;create_token_payments&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;curl&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v72\\\\\\\/payments \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n   \\\\&amp;quot;amount\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;value\\\\&amp;quot;:0,\\\\n      \\\\&amp;quot;currency\\\\&amp;quot;:\\\\&amp;quot;USD\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;paymentMethod\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;type\\\\&amp;quot;:\\\\&amp;quot;scheme\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedCardNumber\\\\&amp;quot;: \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedExpiryMonth\\\\&amp;quot;: \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedExpiryYear\\\\&amp;quot;: \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedSecurityCode\\\\&amp;quot;: \\\\&amp;quot;test_737\\\\&amp;quot;,\\\\n      \\\\&amp;quot;holderName\\\\&amp;quot;:\\\\&amp;quot;John Smith\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;reference\\\\&amp;quot;:\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperInteraction\\\\&amp;quot;: \\\\&amp;quot;Ecommerce\\\\&amp;quot;,\\\\n   \\\\&amp;quot;recurringProcessingModel\\\\&amp;quot;: \\\\&amp;quot;CardOnFile\\\\&amp;quot;,\\\\n   \\\\&amp;quot;storePaymentMethod\\\\&amp;quot;: \\\\&amp;quot;true\\\\&amp;quot;,\\\\n   \\\\&amp;quot;merchantAccount\\\\&amp;quot;:\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperReference\\\\&amp;quot;:\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n   \\\\&amp;quot;returnUrl\\\\&amp;quot;:\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;\\\\n}&#039;&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;java&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Java&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Java API Library v39.3.0\\\\nimport com.adyen.Client;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.model.checkout.*;\\\\nimport java.time.OffsetDateTime;\\\\nimport java.util.*;\\\\nimport com.adyen.model.RequestOptions;\\\\nimport com.adyen.service.checkout.*;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nClient client = new Client(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;, Environment.TEST);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nAmount amount = new Amount()\\\\n  .currency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  .value(0L);\\\\n\\\\nCardDetails cardDetails = new CardDetails()\\\\n  .encryptedCardNumber(\\\\&amp;quot;test_4111111111111111\\\\&amp;quot;)\\\\n  .holderName(\\\\&amp;quot;John Smith\\\\&amp;quot;)\\\\n  .encryptedSecurityCode(\\\\&amp;quot;test_737\\\\&amp;quot;)\\\\n  .encryptedExpiryYear(\\\\&amp;quot;test_2030\\\\&amp;quot;)\\\\n  .encryptedExpiryMonth(\\\\&amp;quot;test_03\\\\&amp;quot;)\\\\n  .type(CardDetails.TypeEnum.SCHEME);\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest()\\\\n  .reference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  .amount(amount)\\\\n  .storePaymentMethod(true)\\\\n  .merchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  .recurringProcessingModel(PaymentRequest.RecurringProcessingModelEnum.CARDONFILE)\\\\n  .paymentMethod(new CheckoutPaymentMethod(cardDetails))\\\\n  .shopperInteraction(PaymentRequest.ShopperInteractionEnum.ECOMMERCE)\\\\n  .returnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;)\\\\n  .shopperReference(\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nPaymentsApi service = new PaymentsApi(client);\\\\nPaymentResponse response = service.payments(paymentRequest, new RequestOptions().idempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;));&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;PHP&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;&amp;lt;?php\\\\n\\\\\\\/\\\\\\\/ Adyen PHP API Library v28.2.0\\\\nuse Adyen\\\\\\\\Client;\\\\nuse Adyen\\\\\\\\Environment;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CheckoutPaymentMethod;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\PaymentRequest;\\\\nuse Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi;\\\\n\\\\n$client = new Client();\\\\n$client-&amp;gt;setXApiKey(\\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;);\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\n$client-&amp;gt;setEnvironment(Environment::TEST);\\\\n\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\n$amount = new Amount();\\\\n$amount\\\\n  -&amp;gt;setCurrency(\\\\&amp;quot;USD\\\\&amp;quot;)\\\\n  -&amp;gt;setValue(0);\\\\n\\\\n$checkoutPaymentMethod = new CheckoutPaymentMethod();\\\\n$checkoutPaymentMethod\\\\n  -&amp;gt;setEncryptedCardNumber(\\\\&amp;quot;test_4111111111111111\\\\&amp;quot;)\\\\n  -&amp;gt;setHolderName(\\\\&amp;quot;John Smith\\\\&amp;quot;)\\\\n  -&amp;gt;setEncryptedSecurityCode(\\\\&amp;quot;test_737\\\\&amp;quot;)\\\\n  -&amp;gt;setEncryptedExpiryYear(\\\\&amp;quot;test_2030\\\\&amp;quot;)\\\\n  -&amp;gt;setEncryptedExpiryMonth(\\\\&amp;quot;test_03\\\\&amp;quot;)\\\\n  -&amp;gt;setType(\\\\&amp;quot;scheme\\\\&amp;quot;);\\\\n\\\\n$paymentRequest = new PaymentRequest();\\\\n$paymentRequest\\\\n  -&amp;gt;setReference(\\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;)\\\\n  -&amp;gt;setAmount($amount)\\\\n  -&amp;gt;setStorePaymentMethod(true)\\\\n  -&amp;gt;setMerchantAccount(\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;)\\\\n  -&amp;gt;setRecurringProcessingModel(\\\\&amp;quot;CardOnFile\\\\&amp;quot;)\\\\n  -&amp;gt;setPaymentMethod($checkoutPaymentMethod)\\\\n  -&amp;gt;setShopperInteraction(\\\\&amp;quot;Ecommerce\\\\&amp;quot;)\\\\n  -&amp;gt;setReturnUrl(\\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;)\\\\n  -&amp;gt;setShopperReference(\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;);\\\\n\\\\n$requestOptions[&#039;idempotencyKey&#039;] = &#039;UUID&#039;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\n$service = new PaymentsApi($client);\\\\n$response = $service-&amp;gt;payments($paymentRequest, $requestOptions);&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;cs&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;C#&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen .net API Library v32.1.1\\\\nusing Adyen;\\\\nusing Environment = Adyen.Model.Environment;\\\\nusing Adyen.Model;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nvar config = new Config()\\\\n{\\\\n    XApiKey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n    Environment = Environment.Test\\\\n};\\\\nvar client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nAmount amount = new Amount\\\\n{\\\\n  Currency = \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value = 0\\\\n};\\\\n\\\\nCardDetails cardDetails = new CardDetails\\\\n{\\\\n  EncryptedCardNumber = \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n  HolderName = \\\\&amp;quot;John Smith\\\\&amp;quot;,\\\\n  EncryptedSecurityCode = \\\\&amp;quot;test_737\\\\&amp;quot;,\\\\n  EncryptedExpiryYear = \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n  EncryptedExpiryMonth = \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n  Type = CardDetails.TypeEnum.Scheme\\\\n};\\\\n\\\\nPaymentRequest paymentRequest = new PaymentRequest\\\\n{\\\\n  Reference = \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  Amount = amount,\\\\n  StorePaymentMethod = true,\\\\n  MerchantAccount = \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  RecurringProcessingModel = PaymentRequest.RecurringProcessingModelEnum.CardOnFile,\\\\n  PaymentMethod = new CheckoutPaymentMethod(cardDetails),\\\\n  ShopperInteraction = PaymentRequest.ShopperInteractionEnum.Ecommerce,\\\\n  ReturnUrl = \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n  ShopperReference = \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nvar service = new PaymentsService(client);\\\\nvar response = service.Payments(paymentRequest, requestOptions: new RequestOptions { IdempotencyKey = \\\\&amp;quot;UUID\\\\&amp;quot;});&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (JavaScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v29.0.0\\\\nconst { Client, CheckoutAPI } = require(&#039;@adyen\\\\\\\/api-library&#039;);\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nconst config = new Config({\\\\n  apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  environment: EnvironmentEnum.TEST\\\\n});\\\\n\\\\nconst client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst paymentRequest = {\\\\n  amount: {\\\\n    value: 0,\\\\n    currency: \\\\&amp;quot;USD\\\\&amp;quot;\\\\n  },\\\\n  paymentMethod: {\\\\n    type: \\\\&amp;quot;scheme\\\\&amp;quot;,\\\\n    encryptedCardNumber: \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n    encryptedExpiryMonth: \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n    encryptedExpiryYear: \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n    encryptedSecurityCode: \\\\&amp;quot;test_737\\\\&amp;quot;,\\\\n    holderName: \\\\&amp;quot;John Smith\\\\&amp;quot;\\\\n  },\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  shopperInteraction: \\\\&amp;quot;Ecommerce\\\\&amp;quot;,\\\\n  recurringProcessingModel: \\\\&amp;quot;CardOnFile\\\\&amp;quot;,\\\\n  storePaymentMethod: \\\\&amp;quot;true\\\\&amp;quot;,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  shopperReference: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;go&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Go&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Go API Library v21.0.0\\\\nimport (\\\\n  \\\\&amp;quot;context\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v21\\\\\\\/src\\\\\\\/common\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v21\\\\\\\/src\\\\\\\/adyen\\\\&amp;quot;\\\\n  \\\\&amp;quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/v21\\\\\\\/src\\\\\\\/checkout\\\\&amp;quot;\\\\n)\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nclient := adyen.NewClient(&amp;amp;common.Config{\\\\n  ApiKey:      \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  Environment: common.TestEnv,\\\\n})\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\namount := checkout.Amount{\\\\n  Currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  Value: 0,\\\\n}\\\\n\\\\ncardDetails := checkout.CardDetails{\\\\n  EncryptedCardNumber: common.PtrString(\\\\&amp;quot;test_4111111111111111\\\\&amp;quot;),\\\\n  HolderName: common.PtrString(\\\\&amp;quot;John Smith\\\\&amp;quot;),\\\\n  EncryptedSecurityCode: common.PtrString(\\\\&amp;quot;test_737\\\\&amp;quot;),\\\\n  EncryptedExpiryYear: common.PtrString(\\\\&amp;quot;test_2030\\\\&amp;quot;),\\\\n  EncryptedExpiryMonth: common.PtrString(\\\\&amp;quot;test_03\\\\&amp;quot;),\\\\n  Type: common.PtrString(\\\\&amp;quot;scheme\\\\&amp;quot;),\\\\n}\\\\n\\\\npaymentRequest := checkout.PaymentRequest{\\\\n  Reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  Amount: amount,\\\\n  StorePaymentMethod: common.PtrBool(true),\\\\n  MerchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  RecurringProcessingModel: common.PtrString(\\\\&amp;quot;CardOnFile\\\\&amp;quot;),\\\\n  PaymentMethod: checkout.CardDetailsAsCheckoutPaymentMethod(&amp;amp;cardDetails),\\\\n  ShopperInteraction: common.PtrString(\\\\&amp;quot;Ecommerce\\\\&amp;quot;),\\\\n  ReturnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n  ShopperReference: common.PtrString(\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;),\\\\n}\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nservice := client.Checkout()\\\\nreq := service.PaymentsApi.PaymentsInput().IdempotencyKey(\\\\&amp;quot;UUID\\\\&amp;quot;).PaymentRequest(paymentRequest)\\\\nres, httpRes, err := service.PaymentsApi.Payments(context.Background(), req)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;py&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Python&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Python API Library v13.6.0\\\\nimport Adyen\\\\n\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;\\\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nadyen.client.platform = \\\\&amp;quot;test\\\\&amp;quot; # The environment to use library in.\\\\n\\\\n# Create the request object(s)\\\\njson_request = {\\\\n  \\\\&amp;quot;amount\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;value\\\\&amp;quot;: 0,\\\\n    \\\\&amp;quot;currency\\\\&amp;quot;: \\\\&amp;quot;USD\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;paymentMethod\\\\&amp;quot;: {\\\\n    \\\\&amp;quot;type\\\\&amp;quot;: \\\\&amp;quot;scheme\\\\&amp;quot;,\\\\n    \\\\&amp;quot;encryptedCardNumber\\\\&amp;quot;: \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n    \\\\&amp;quot;encryptedExpiryMonth\\\\&amp;quot;: \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n    \\\\&amp;quot;encryptedExpiryYear\\\\&amp;quot;: \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n    \\\\&amp;quot;encryptedSecurityCode\\\\&amp;quot;: \\\\&amp;quot;test_737\\\\&amp;quot;,\\\\n    \\\\&amp;quot;holderName\\\\&amp;quot;: \\\\&amp;quot;John Smith\\\\&amp;quot;\\\\n  },\\\\n  \\\\&amp;quot;reference\\\\&amp;quot;: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperInteraction\\\\&amp;quot;: \\\\&amp;quot;Ecommerce\\\\&amp;quot;,\\\\n  \\\\&amp;quot;recurringProcessingModel\\\\&amp;quot;: \\\\&amp;quot;CardOnFile\\\\&amp;quot;,\\\\n  \\\\&amp;quot;storePaymentMethod\\\\&amp;quot;: \\\\&amp;quot;True\\\\&amp;quot;,\\\\n  \\\\&amp;quot;merchantAccount\\\\&amp;quot;: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  \\\\&amp;quot;shopperReference\\\\&amp;quot;: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n  \\\\&amp;quot;returnUrl\\\\&amp;quot;: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(request=json_request, idempotency_key=\\\\&amp;quot;UUID\\\\&amp;quot;)&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;rb&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;Ruby&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;# Adyen Ruby API Library v10.4.0\\\\nrequire \\\\&amp;quot;adyen-ruby-api-library\\\\&amp;quot;\\\\n\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;ADYEN_API_KEY&#039;\\\\n# For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nadyen.env = :test # Set to \\\\&amp;quot;live\\\\&amp;quot; for live environment\\\\n\\\\n# Create the request object(s)\\\\nrequest_body = {\\\\n  :amount =&amp;gt; {\\\\n    :value =&amp;gt; 0,\\\\n    :currency =&amp;gt; &#039;USD&#039;\\\\n  },\\\\n  :paymentMethod =&amp;gt; {\\\\n    :type =&amp;gt; &#039;scheme&#039;,\\\\n    :encryptedCardNumber =&amp;gt; &#039;test_4111111111111111&#039;,\\\\n    :encryptedExpiryMonth =&amp;gt; &#039;test_03&#039;,\\\\n    :encryptedExpiryYear =&amp;gt; &#039;test_2030&#039;,\\\\n    :encryptedSecurityCode =&amp;gt; &#039;test_737&#039;,\\\\n    :holderName =&amp;gt; &#039;John Smith&#039;\\\\n  },\\\\n  :reference =&amp;gt; &#039;YOUR_ORDER_REFERENCE&#039;,\\\\n  :shopperInteraction =&amp;gt; &#039;Ecommerce&#039;,\\\\n  :recurringProcessingModel =&amp;gt; &#039;CardOnFile&#039;,\\\\n  :storePaymentMethod =&amp;gt; &#039;true&#039;,\\\\n  :merchantAccount =&amp;gt; &#039;YOUR_MERCHANT_ACCOUNT&#039;,\\\\n  :shopperReference =&amp;gt; &#039;YOUR_SHOPPER_REFERENCE&#039;,\\\\n  :returnUrl =&amp;gt; &#039;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...&#039;\\\\n}\\\\n\\\\n# Send the request\\\\nresult = adyen.checkout.payments_api.payments(request_body, headers: { &#039;Idempotency-Key&#039; =&amp;gt; &#039;UUID&#039; })&amp;quot;},{&amp;quot;language&amp;quot;:&amp;quot;ts&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;NodeJS (TypeScript)&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;\\\\\\\/\\\\\\\/ Adyen Node API Library v29.0.0\\\\nimport { Client, CheckoutAPI, Types } from \\\\&amp;quot;@adyen\\\\\\\/api-library\\\\&amp;quot;;\\\\n\\\\n\\\\\\\/\\\\\\\/ For the LIVE environment, also include your liveEndpointUrlPrefix.\\\\nconst config = new Config({\\\\n  apiKey: \\\\&amp;quot;ADYEN_API_KEY\\\\&amp;quot;,\\\\n  environment: EnvironmentEnum.TEST\\\\n});\\\\n\\\\nconst client = new Client(config);\\\\n\\\\n\\\\\\\/\\\\\\\/ Create the request object(s)\\\\nconst amount: Types.checkout.Amount = {\\\\n  currency: \\\\&amp;quot;USD\\\\&amp;quot;,\\\\n  value: 0\\\\n};\\\\n\\\\nconst cardDetails: Types.checkout.CardDetails = {\\\\n  encryptedCardNumber: \\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n  holderName: \\\\&amp;quot;John Smith\\\\&amp;quot;,\\\\n  encryptedSecurityCode: \\\\&amp;quot;test_737\\\\&amp;quot;,\\\\n  encryptedExpiryYear: \\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n  encryptedExpiryMonth: \\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n  type: Types.checkout.CardDetails.TypeEnum.Scheme\\\\n};\\\\n\\\\nconst paymentRequest: Types.checkout.PaymentRequest = {\\\\n  reference: \\\\&amp;quot;YOUR_ORDER_REFERENCE\\\\&amp;quot;,\\\\n  amount: amount,\\\\n  storePaymentMethod: true,\\\\n  merchantAccount: \\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n  recurringProcessingModel: Types.checkout.PaymentRequest.RecurringProcessingModelEnum.CardOnFile,\\\\n  paymentMethod: cardDetails,\\\\n  shopperInteraction: Types.checkout.PaymentRequest.ShopperInteractionEnum.Ecommerce,\\\\n  returnUrl: \\\\&amp;quot;https:\\\\\\\/\\\\\\\/your-company.example.com\\\\\\\/...\\\\&amp;quot;,\\\\n  shopperReference: \\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;\\\\n};\\\\n\\\\n\\\\\\\/\\\\\\\/ Send the request\\\\nconst checkoutAPI = new CheckoutAPI(client);\\\\nconst response = checkoutAPI.PaymentsApi.payments(paymentRequest, { idempotencyKey: \\\\&amp;quot;UUID\\\\&amp;quot; });&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;p&gt;The token is created after a successful payment authorization to ensure that the payment details the shopper provided are linked to an active, chargeable account.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Depending on the &lt;code&gt;recurringProcessingModel&lt;\\\/code&gt;, &lt;a href=\\&quot;\\\/pt\\\/get-started-with-adyen\\\/adyen-glossary\\\/#strong-customer-authentication-sca\\&quot;&gt;Strong Customer Authentication (SCA)&lt;\\\/a&gt; may be required. Use your &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/advanced-flow\\&quot;&gt;Advanced flow integration&lt;\\\/a&gt; to handle the authentication.&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;&lt;strong&gt;CardOnFile&lt;\\\/strong&gt;: regulations and scheme rules may require SCA.&lt;\\\/li&gt;\\n&lt;li&gt;&lt;strong&gt;Subscription&lt;\\\/strong&gt; and &lt;strong&gt;UnscheduledCardOnFile&lt;\\\/strong&gt;: SCA is required for the initial payment.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Wait for the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments&lt;\\\/a&gt; or  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/payments\\\/details\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/payments\\\/details&lt;\\\/a&gt; response to learn whether the payment is successfully authorized. The &lt;a href=\\&quot;\\\/pt\\\/online-payments\\\/build-your-integration\\\/payment-result-codes\\&quot;&gt;\\n  &lt;code&gt;resultCode&lt;\\\/code&gt;\\n&lt;\\\/a&gt; informs you whether the payment authorization was successful.&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Result code&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;th&gt;Action&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Authorised&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The payment was successful, and the payment details were tokenized.&lt;\\\/td&gt;\\n&lt;td&gt;For some payment methods, the API response includes the token in &lt;code&gt;additionalData.tokenization.storedPaymentMethodId&lt;\\\/code&gt; and  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Webhooks\\\/latest\\\/post\\\/AUTHORISATION\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;AUTHORISATION&lt;\\\/a&gt; webhook. We recommend to always get the token from the &lt;strong&gt;recurring.token.created&lt;\\\/strong&gt; webhook.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Pending&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The payment is pending, and the payment details haven not been tokenized yet.&lt;\\\/td&gt;\\n&lt;td&gt;Wait for the &lt;strong&gt;recurring.token.created&lt;\\\/strong&gt; webhook that you get when the payment reaches the &lt;strong&gt;Authorised&lt;\\\/strong&gt; status.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;strong&gt;Refused&lt;\\\/strong&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The payment was refused, and the payment details were not tokenized.&lt;\\\/td&gt;\\n&lt;td&gt;Make another payment request to try tokenizing again.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n&lt;p&gt;For payments where authorization happens asynchronously, the response does not include a token. To make sure you do not miss an update when a token is created, we recommend to always listen to the  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Tokenization-webhooks\\\/latest\\\/post\\\/recurring.token.created\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;recurring.token.created&lt;\\\/a&gt; webhook.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Authorized payment response including the token&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;json\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n    \\\\\\&quot;additionalData\\\\\\&quot;: {\\\\n        \\\\\\&quot;tokenization.shopperReference\\\\\\&quot;: \\\\\\&quot;YOUR_SHOPPER_REFERENCE\\\\\\&quot;,\\\\n        \\\\\\&quot;tokenization.storedPaymentMethodId\\\\\\&quot;: \\\\\\&quot;M5N7TQ4TG5PFWR50\\\\\\&quot;,\\\\n        \\\\\\&quot;tokenization.store.operationType\\\\\\&quot;: \\\\\\&quot;created\\\\\\&quot;\\\\n    },\\\\n    \\\\\\&quot;pspReference\\\\\\&quot;: \\\\\\&quot;DZ4DPSHB4WD2WN82\\\\\\&quot;,\\\\n    \\\\\\&quot;resultCode\\\\\\&quot;: \\\\\\&quot;Authorised\\\\\\&quot;,\\\\n    \\\\\\&quot;amount\\\\\\&quot;: {\\\\n        \\\\\\&quot;currency\\\\\\&quot;: \\\\\\&quot;USD\\\\\\&quot;,\\\\n        \\\\\\&quot;value\\\\\\&quot;: 0\\\\n    },\\\\n    \\\\\\&quot;merchantReference\\\\\\&quot;: \\\\\\&quot;YOUR_ORDER_REFERENCE\\\\\\&quot;\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Get the token you can use for future payments from the asynchronous &lt;a href=\\&quot;#enable-the-webhook\\&quot;&gt;Recurring tokens life cycle events&lt;\\\/a&gt; webhook with &lt;code&gt;type&lt;\\\/code&gt;:  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Tokenization-webhooks\\\/latest\\\/post\\\/recurring.token.created\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;recurring.token.created&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;payments-create-a-token&quot;,&quot;oldTabId&quot;:&quot;payments-create-a-token_2&quot;,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;&lt;code&gt;\\\/storedPaymentMethods&lt;\\\/code&gt;&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;&lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt; This endpoint is only available on  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/70\\\/overview\\&quot; class=\\&quot; external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;Checkout API v70&lt;\\\/a&gt; or later. &lt;\\\/div&gt;&lt;\\\/div&gt;&lt;\\\/p&gt;\\n&lt;p&gt;We recommend that you store payment details by making a zero-auth transaction, because a successful authorization indicates that the payment details were validated by the card scheme.&lt;\\\/p&gt;\\n&lt;p&gt;If you validated a shopper&#039;s payment details in a different way, you can store payment details without making a zero-auth transaction.&lt;\\\/p&gt;\\n&lt;p&gt;To store your shopper&#039;s payment details:&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;From your server, make a POST  &lt;a href=\\&quot;https:\\\/\\\/docs.adyen.com\\\/api-explorer\\\/Checkout\\\/latest\\\/post\\\/storedPaymentMethods\\&quot; class=\\&quot;codeLabel  external-link no-image\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot;&gt;\\\/storedPaymentMethods&lt;\\\/a&gt; request including:&lt;\\\/p&gt;\\n&lt;table&gt;\\n&lt;thead&gt;\\n&lt;tr&gt;\\n&lt;th&gt;Parameter&lt;\\\/th&gt;\\n&lt;th&gt;Required&lt;\\\/th&gt;\\n&lt;th&gt;Description&lt;\\\/th&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/thead&gt;\\n&lt;tbody&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;merchantAccount&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Your merchant account.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;shopperReference&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;Your unique reference for the shopper. Do not include personally identifiable information (PII), such as name or email address.&lt;br&gt; &lt;strong&gt;Format:&lt;\\\/strong&gt; &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;Minimum length: 3 characters.&lt;\\\/li&gt;&lt;li&gt;Case-sensitive.&lt;\\\/il&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;paymentMethod.type&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The payment method type. Set to &lt;strong&gt;scheme&lt;\\\/strong&gt;.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;paymentMethod.encryptedCardNumber&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The encrypted card number.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;paymentMethod.encryptedExpiryMonth&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The encrypted card expiry month.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;paymentMethod.encryptedExpiryYear&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The encrypted card expiry year.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;paymentMethod.holderName&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The name of the card holder.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;recurringProcessingModel&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;img title=\\&quot;-white_check_mark-\\&quot; alt=\\&quot;-white_check_mark-\\&quot; class=\\&quot;smileys\\&quot; src=\\&quot;\\\/user\\\/data\\\/smileys\\\/emoji\\\/white_check_mark.png\\&quot; \\\/&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The type of recurring payment the token is intended for. &lt;br&gt; If you want to use the token for more than one type of recurring payment, use the type that is most appropriate at the time of token creation. In subsequent transactions, you can specify another &lt;code&gt;recurringProcessingModel&lt;\\\/code&gt;.  &lt;br&gt; &lt;strong&gt;Possible values&lt;\\\/strong&gt;: &lt;ul&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;CardOnFile&lt;\\\/strong&gt;: A transaction where shopper card details are stored to enable one-click or omnichannel journeys, or to offer a faster checkout later.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;UnscheduledCardOnFile&lt;\\\/strong&gt;: A transaction that occurs on a non-fixed schedule and\\\/or have variable amounts.&lt;\\\/li&gt;&lt;li markdown=\\&quot;1\\&quot;&gt;&lt;strong&gt;Subscription&lt;\\\/strong&gt;:  A transaction for a fixed or variable amount, which follows a fixed schedule.&lt;\\\/li&gt;&lt;\\\/ul&gt;&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;shopperEmail&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s email address.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;tr&gt;\\n&lt;td&gt;&lt;code&gt;shopperIP&lt;\\\/code&gt;&lt;\\\/td&gt;\\n&lt;td&gt;&lt;\\\/td&gt;\\n&lt;td&gt;The shopper&#039;s IP address.&lt;\\\/td&gt;\\n&lt;\\\/tr&gt;\\n&lt;\\\/tbody&gt;\\n&lt;\\\/table&gt;\\n &lt;div class=\\&quot;sc-notice info\\&quot;&gt;&lt;div&gt;\\n&lt;p&gt;If you are &lt;a href=\\&quot;\\\/pt\\\/development-resources\\\/pci-dss-compliance-guide\\\/\\&quot;&gt;fully PCI compliant&lt;\\\/a&gt;, and use &lt;a href=\\&quot;\\\/pt\\\/payment-methods\\\/cards\\\/raw-card-data#recurring-payments\\&quot;&gt;unencrypted card data&lt;\\\/a&gt;, use the raw card data fields instead:&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;&lt;code&gt;paymentMethod.number&lt;\\\/code&gt;&lt;\\\/li&gt;\\n&lt;li&gt;&lt;code&gt;paymentMethod.expiryMonth&lt;\\\/code&gt;&lt;\\\/li&gt;\\n&lt;li&gt;&lt;code&gt;paymentMethod.expiryYear&lt;\\\/code&gt;&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;&lt;code&gt;paymentMethod.holderName&lt;\\\/code&gt;&lt;\\\/p&gt;\\n&lt;\\\/div&gt;&lt;\\\/div&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Example request to store encrypted card details&#039;\\&quot; :id=\\&quot;&#039;example-request-to-store-encrypted-payment-details&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;bash&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;curl https:\\\\\\\/\\\\\\\/checkout-test.adyen.com\\\\\\\/v71\\\\\\\/storedPaymentMethods \\\\\\\\\\\\n-H &#039;x-api-key: ADYEN_API_KEY&#039; \\\\\\\\\\\\n-H &#039;content-type: application\\\\\\\/json&#039; \\\\\\\\\\\\n-d &#039;{\\\\n   \\\\&amp;quot;merchantAccount\\\\&amp;quot;:\\\\&amp;quot;YOUR_MERCHANT_ACCOUNT\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperReference\\\\&amp;quot;:\\\\&amp;quot;YOUR_SHOPPER_REFERENCE\\\\&amp;quot;,\\\\n   \\\\&amp;quot;paymentMethod\\\\&amp;quot;:{\\\\n      \\\\&amp;quot;type\\\\&amp;quot;:\\\\&amp;quot;scheme\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedCardNumber\\\\&amp;quot;:\\\\&amp;quot;test_4111111111111111\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedExpiryMonth\\\\&amp;quot;:\\\\&amp;quot;test_03\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedExpiryYear\\\\&amp;quot;:\\\\&amp;quot;test_2030\\\\&amp;quot;,\\\\n      \\\\&amp;quot;encryptedSecurityCode\\\\&amp;quot;:\\\\&amp;quot;test_737\\\\&amp;quot;,\\\\n      \\\\&amp;quot;holderName\\\\&amp;quot;:\\\\&amp;quot;John Smith\\\\&amp;quot;\\\\n   },\\\\n   \\\\&amp;quot;recurringProcessingModel\\\\&amp;quot;:\\\\&amp;quot;Subscription\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperEmail\\\\&amp;quot;:\\\\&amp;quot;s.hopper@test.com\\\\&amp;quot;,\\\\n   \\\\&amp;quot;shopperIP\\\\&amp;quot;:\\\\&amp;quot;192.0.2.1\\\\&amp;quot;\\\\n}&#039;&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;From the response, note the &lt;code&gt;id&lt;\\\/code&gt; field. This is the token that you need to make subsequent payment with the token. If you store tokens on your server, associate the &lt;code&gt;id&lt;\\\/code&gt; with the &lt;code&gt;shopperReference&lt;\\\/code&gt;.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Example response including the token id&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;bash\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;{\\\\n    \\\\\\&quot;expiryMonth\\\\\\&quot;: \\\\\\&quot;03\\\\\\&quot;,\\\\n    \\\\\\&quot;expiryYear\\\\\\&quot;: \\\\\\&quot;2030\\\\\\&quot;,\\\\n    \\\\\\&quot;holderName\\\\\\&quot;: \\\\\\&quot;John Smith\\\\\\&quot;,\\\\n    \\\\\\&quot;id\\\\\\&quot;: \\\\\\&quot;KHQC5N7G84BLNK43\\\\\\&quot;,\\\\n    \\\\\\&quot;lastFour\\\\\\&quot;: \\\\\\&quot;1111\\\\\\&quot;,\\\\n    \\\\\\&quot;shopperReference\\\\\\&quot;: \\\\\\&quot;YOUR_SHOPPER_REFERENCE\\\\\\&quot;,\\\\n    \\\\\\&quot;type\\\\\\&quot;: \\\\\\&quot;scheme\\\\\\&quot;\\\\n}\\&quot;}]&#039; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;stored-payment-methods-create-a-token&quot;,&quot;oldTabId&quot;:&quot;stored-payment-methods-create-a-token_3&quot;,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2 id=\"import-stored-payment-details\">Import stored payment details<\/h2>\n<p>If you have existing recurring contracts with another payment service provider, you can migrate and <a href=\"\/pt\/development-resources\/migrating-payment-data\/import-payment-details-for-recurring-payments\">import stored payment details<\/a> to Adyen. When you import the data, you do not need to collect your shoppers' payment details again to create a token.<\/p>\n<p>When the stored payment details are successfully migrated, you receive an <a href=\"\/pt\/development-resources\/migrating-payment-data\/import-payment-details-for-recurring-payments#output-file-reference\">output file<\/a>. From this file you can get the parameters that you need to use the tokens in future payments.<\/p>\n<h2 id=\"test-and-go-live\">Test and go live<\/h2>\n<p>Follow our <a href=\"\/pt\/development-resources\/testing\/tokenization\/\">testing guide for tokenization<\/a> and make sure that you receive 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 when you store payment details.<\/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=\"\/pt\/online-payments\/go-live-checklist#tokenization\">Tokenization end-to-end testing checklist<\/a>.<\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/pt\/online-payments\/tokenization\/create-tokens","articleFields":{"description":"Learn how to create tokens with your online payments integration.","feedback_component":true,"next_steps":[{"title":"Make token payments","description":"Make one-click, subscription, or unscheduled card-on-file payments with the tokens you created.","url":"\/online-payments\/tokenization\/make-token-payments","required":false},{"title":"Manage tokens","description":"Retrieve, update, and disable tokens you stored with Adyen.","url":"\/online-payments\/tokenization\/managing-tokens","required":false}],"id":"39949035","type":"page","_expandable":{"operations":""},"status":"current","filters_component":false,"last_edit_on":"28-07-2023 15:28","page_id":"244d7b3e-97bf-4bea-afab-f3745b30684f","decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/pt\/online-payments\/tokenization\/create-tokens","title":"Create tokens","content":"To tokenize your shopper's payment details, you need to include additional fields when you make an API request to create a payment session or make a payment. When the details are successfully tokenized, you receive a webhook that contains the token you can use for subsequent payments.\nYou can tokenize your shopper's payment details when they pay for a purchase, or with a zero-value auth.\nIf you already have existing recurring contracts with another payment service provider, you can import the stored payment details to Adyen.\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 roles: Checkout webservice role Merchant Recurring role Only if you want to use the  \/storedPaymentMethods endpoint: API tokenise payment details\n\n\nWebhooks\nSubscribe to the Recurring tokens life cycle events webhook.\n\n\nLimitations\nWith the  \/sessions endpoint, you can create tokens for all recurring payment types, but making subsequent subscription or unscheduled card-on-file payments require using the  \/payments endpoint.\n\n\nSetup steps\nBefore you begin: Add the payment methods that support recurring payments in your Customer Area.Set up your online payments integration. If you are implementing 3D Secure for PSD2 SCA compliance, use our self-service guide to find out about the PSD2 SCA compliance rules that apply to your business when tokenizing shopper payment details. Review additional SCA requirements based on business models that can apply to you, depending on your tokenization implementation.\n\n\n\nHow it works\nTo store your shoppers payment details and get a token that you can use for future payments:\n\nEnable the Recurring tokens life cycle events webhook.\nBefore the shopper pays on your website or app, ask for their consent to store their payment details for future payments. You must inform the shopper about the payment schedule and the amount that you will charge to reduce the risk of chargebacks.\nIn your payment request, include tokenization parameters to create a token with the shopper's payment details. Multiple endpoints support tokenizing your shopper's payment details:\n\nPOST  \/sessions: the simplest way to create tokens. The payment session contains all the information needed to collect payment details securely. This reduces your PCI scope to the simplest level (SAQ A).\nPOST  \/payments: lets you have more control over the checkout experience, and lets you handle more complex payment flows where you need to manage the state and data flow yourself.\nPOST  \/storedPaymentMethods: Only available on Checkout API v70 and later. Lets you create tokens without an authorization. We recommend to create tokens with an authorization, to make sure the tokens you create are linked to active, chargeable accounts.\n\nAfter the transaction is authorized, get the unique identifier and other information about the token from the  recurring.token.created webhook.\n\nEnable the webhook\nTo get updates when a token is created, updated, or disabled, enable the Recurring tokens life cycle events webhook.\nThis webhook includes:\n\ndata.storedPaymentMethodId: the ID of the token that was created, updated, or disabled.\ndata.shopperReference:: your unique shopper reference.\neventId: the pspReference for the transaction 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 token was created. To use in future recurring payments, store the storedPaymentMethodId together with the shopperReference, so that you associate the token with the shopper.\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\nWe recommend that you set up the webhook with all default events.\n\n    \n\n\nWe are no longer working on the development of the  RECURRING_CONTRACT webhook. We strongly recommend to use the new Recurring tokens life cycle events webhook instead, because it keeps you informed of more token lifecycle events. If your integration already uses the  RECURRING_CONTRACT webhook, the webhook remains available.\n\nCreate a token\nSelect the endpoint you are using:\n\n\n    \n        \n        \n    \n\n\nImport stored payment details\nIf you have existing recurring contracts with another payment service provider, you can migrate and import stored payment details to Adyen. When you import the data, you do not need to collect your shoppers' payment details again to create a token.\nWhen the stored payment details are successfully migrated, you receive an output file. From this file you can get the parameters that you need to use the tokens in future payments.\nTest and go live\nFollow our testing guide for tokenization and make sure that you receive the  recurring.token.created webhook when you store payment details.\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":"pt","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Tokenization","lvl3":"Create 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\/create-tokens"},"levels":4,"category":"Online Payments","category_color":"green","tags":["Create","tokens"]}}
