{"title":"Drop-in","category":"default","creationDate":1781186417,"content":"<p>Our pre-built Drop-in includes the UI and client-side logic to show available payment methods to your shopper, collect their payment information, and handle the complete payment flow.<\/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;\">Use this information to build an online payments integration.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Customer Area roles<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have the following roles: <ul><li markdown=\"1\"><strong>Merchant admin role<\/strong><\/li> <li markdown=\"1\"><strong>Manage API credentials<\/strong><\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Adyen API credentials<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have created the following: <ul><li markdown=\"1\">API credential<\/li> <li markdown=\"1\">API key<\/li> <li markdown=\"1\">Client key<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Adyen API credential roles<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have the roles for payments that are assigned by default.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Webhooks<\/strong><\/td>\n<td style=\"text-align: left;\">Subscribe to the following webhooks: <ul><li markdown=\"1\">standard webhook with default event codes<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Limitations<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that your integration follows our recommended best practices: <ul><li markdown=\"1\"><strong><a href=\"\/standard\/integration\/drop-in\/best-practices\/#avoid-iframe-elements\">&lt;iframe&gt;<\/a><\/strong>: an &lt;iframe> must be hosted on the same domain as the parent window to support payment flows that use redirects.<\/li><li markdown=\"1\"><strong><a href=\"\/standard\/integration\/drop-in\/best-practices\/#avoid-webviews\">WebViews<\/a><\/strong>: we do not recommend using WebViews in native apps due to security and functionality limitations. Use native equivalents instead.<\/li><li markdown=\"1\"><strong><a href=\"\/standard\/integration\/drop-in\/best-practices\/#manage-server-side-rendering-ssr-\">Server-side Rendering (SSR)<\/a><\/strong>: if you use SSR, ensure the <code>AdyenCheckout<\/code> instance and Drop-in are initialized on the client side.<\/li><li markdown=\"1\"><strong><a href=\"\/standard\/integration\/drop-in\/best-practices\/#supported-browsers\">Browser support<\/a><\/strong>: we support recent versions of all major browsers.<\/li><\/ul> For 3D Secure 2: <ul><li markdown=\"1\">A strict Content Security Policy (CSP) can prevent native 3D Secure 2 challenges from being loaded on your website, because loading the 3D Secure 2 interface requires adding more URLs to your CSP. Adyen does not maintain a list of all URLs. You can specify to use the redirect flow when creating a session if you do not want to adjust your CSP.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Make sure that you have done the following: <ul><li markdown=\"1\">Set up your test account.<\/li><li markdown=\"1\">Got an overview of what is required before you accept live payments.<\/li><\/ul><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 id=\"how-it-works\">How it works<\/h2>\n<p>For a Drop-in integration, you must implement the following parts:<\/p>\n<ul>\n<li><strong>Your payment server<\/strong>: Sends the API request to create a payment session.\n<ul>\n<li>Use 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 on Checkout API v72 or later.<\/li>\n<li>Use a <a href=\"https:\/\/github.com\/Adyen#server-side\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">server-side library<\/a> released on March 30, 2026 or later.<\/li>\n<\/ul><\/li>\n<li><strong>Your client website<\/strong>: Shows the Drop-in UI where the shopper makes the payment. Drop-in uses the data from the API responses to handle the payment flow and additional actions on your client website.\n<ul>\n<li>Use <a href=\"https:\/\/github.com\/Adyen\/adyen-web\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Web Drop-in<\/a> v6.30.0 or later.<\/li>\n<\/ul><\/li>\n<li><strong>Your webhook server<\/strong>: Listens for webhook messages that include the outcome of each payment.<\/li>\n<\/ul>\n<h3>Payment flow<\/h3>\n<p>The parts of your integration work together to complete the payment flow. The payment flow is the same for all payments:<\/p>\n<ol>\n<li>The shopper goes to the checkout page.<\/li>\n<li>Your client website triggers a request to your payment server to create a payment session.<\/li>\n<li>Your server uses the shopper's country and currency information from your client to 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 to create a payment session. Adyen returns session data (<code>session.id<\/code>, <code>session.sessionData<\/code>).<\/li>\n<li>Your server passes the session data to your client website.<\/li>\n<li>Your client website creates an instance of <code>AdyenCheckout<\/code> using the session data, initializes Drop-in, and shows the payment UI to the shopper.<\/li>\n<li>The shopper selects the payment method, enters payment details, and submits the payment.<\/li>\n<li>Drop-in handles the payment flow and sends payment data. Adyen returns the result of the payment session to Drop-in.<\/li>\n<li>Your client website shows the result of the payment session to the shopper.<\/li>\n<li>Your webhook server receives a webhook message with the payment outcome.<\/li>\n<\/ol>\n<div id=\"mermaid-6a2ac62ca5dd7-wrapper\"><div id=\"mermaid-6a2ac62ca5dd7\" class=\"mermaid-shortcode loading\">CnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgQ2xpZW50IGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNlcnZlciBhcyBZb3VyIHBheW1lbnQgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBZHllbgogICAgcGFydGljaXBhbnQgV2ViaG9vayBhcyBZb3VyIHdlYmhvb2sgc2VydmVyCgogICAgU2hvcHBlci0+PkNsaWVudDogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgQ2xpZW50LT4+U2VydmVyOiAyLiBUcmlnZ2VyIHJlcXVlc3QgZm9yIHBheW1lbnQgc2Vzc2lvbgogICAgU2VydmVyLT4+QWR5ZW46IDMuIFJlcXVlc3QgdG8gY3JlYXRlIHBheW1lbnQgc2Vzc2lvbiAoUE9TVCAvc2Vzc2lvbnMpCiAgICBBZHllbi0tPj5TZXJ2ZXI6IFNlc3Npb24gZGF0YSAoc2Vzc2lvbi5pZCwgc2Vzc2lvbi5zZXNzaW9uRGF0YSkKICAgIFNlcnZlci0+PkNsaWVudDogNC4gUGFzcyBzZXNzaW9uIGRhdGEKICAgIENsaWVudC0+PkNsaWVudDogNS4gQ3JlYXRlIGluc3RhbmNlIG9mIGBBZHllbkNoZWNrb3V0YCBhbmQgaW5pdGlhbGl6ZSBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiBTaG93IHBheW1lbnQgVUkgdG8gc2hvcHBlcgogICAgU2hvcHBlci0+PkNsaWVudDogNi4gU3VibWl0IHRoZSBwYXltZW50CiAgICBDbGllbnQtPj5BZHllbjogNy4gRHJvcC1pbiBoYW5kbGVzIHRoZSBwYXltZW50IGZsb3cgYW5kIHNlbmRzIHBheW1lbnQgZGF0YQogICAgQWR5ZW4tLT4+Q2xpZW50OiBSZXN1bHQgb2YgdGhlIHBheW1lbnQgc2Vzc2lvbiB0byBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiA4LiBTaG93IHJlc3VsdCBvZiBwYXltZW50IHNlc3Npb24KICAgIEFkeWVuLT4+V2ViaG9vazogOS4gV2ViaG9vayBtZXNzYWdlIHdpdGggcGF5bWVudCBvdXRjb21lCg==<\/div><\/div>\n<h3>Implementation overview<\/h3>\n<p>This guide is organized by each part of the integration that you must implement:<\/p>\n<ul>\n<li><a href=\"#payment-server\">\n  <strong>Payment server<\/strong>\n<\/a>: Server-side setup and API calls.<\/li>\n<li><a href=\"#client-website\">\n  <strong>Client website<\/strong>\n<\/a>: Client-side setup, Drop-in configuration, and payment handling.<\/li>\n<li><a href=\"#webhook-server\">\n  <strong>Webhook server<\/strong>\n<\/a>: Receiving payment outcome notifications.<\/li>\n<\/ul>\n<h2 id=\"payment-server\">Payment server<\/h2>\n<p>This section covers all the server-side implementation required for your Sessions flow integration. Complete these steps to set up your payment server.<\/p>\n<ul>\n<li><a href=\"#install-api-library\">Install an API library<\/a><\/li>\n<li><a href=\"#create-payment-session\">Create a payment session<\/a><\/li>\n<li><a href=\"#handle-payment-result\">Handle the payment result<\/a><\/li>\n<\/ul>\n<h3 id=\"install-api-library\">Install an API library<\/h3>\n<p>We provide server-side API libraries for several programming languages, available through common package managers, like Gradle and npm, for easier installation and version management. Our API libraries will save you development time, because they:<\/p>\n<ul>\n<li>Use an API version that is up to date.<\/li>\n<li>Have generated models to help you construct requests.<\/li>\n<li>Send the request to Adyen using their built-in HTTP client, so you do not have to create your own.<\/li>\n<\/ul>\n\n<div id=\"tabyQhEa\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/java\\\/gitpod-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-java-spring-online-payments#checkout-example\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/java\\\/github-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-java-spring-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Java 11 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/maven.apache.org\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Maven&lt;\\\/a&gt;, adding this dependency to your project&#039;s POM.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Add the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;xml\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;&amp;lt;dependency&amp;gt;\\\\n  &amp;lt;groupId&amp;gt;com.adyen&amp;lt;\\\\\\\/groupId&amp;gt;\\\\n  &amp;lt;artifactId&amp;gt;adyen-java-api-library&amp;lt;\\\\\\\/artifactId&amp;gt;\\\\n  &amp;lt;version&amp;gt;LATEST_VERSION&amp;lt;\\\\\\\/version&amp;gt;\\\\n&amp;lt;\\\\\\\/dependency&amp;gt;\\&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;p&gt;You can find the latest version on GitHub. Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-java-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Setting up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;java\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;\\\\\\\/\\\\\\\/ Import the required classes.\\\\npackage com.adyen.service;\\\\n\\\\nimport com.adyen.Client;\\\\nimport com.adyen.service.checkout.PaymentsApi;\\\\nimport com.adyen.model.checkout.Amount;\\\\nimport com.adyen.model.checkout.CreateCheckoutSessionRequest;\\\\nimport com.adyen.model.checkout.CreateCheckoutSessionResponse;\\\\nimport com.adyen.enums.Environment;\\\\nimport com.adyen.service.exception.ApiException;\\\\n\\\\nimport java.io.IOException;\\\\n\\\\npublic class Snippet {\\\\n\\\\n    public Snippet() throws IOException, ApiException {\\\\n        \\\\\\\/\\\\\\\/ Set up the client and service.\\\\n        Client client = new Client(\\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;, Environment.TEST);\\\\n    }\\\\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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/php\\\/gitpod-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-php-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/php\\\/github-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-php-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;PHP 7.3 or later.&lt;\\\/li&gt;\\n&lt;li&gt;cURL with SSL support.&lt;\\\/li&gt;\\n&lt;li&gt;The JSON PHP extension.&lt;\\\/li&gt;\\n&lt;li&gt;The list of dependencies from the composer require list.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/getcomposer.org\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Composer&lt;\\\/a&gt;. Follow the &lt;a href=\\&quot;https:\\\/\\\/getcomposer.org\\\/doc\\\/00-intro.md\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;installation instructions&lt;\\\/a&gt; if you do not already have composer installed.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#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;composer require adyen\\\\\\\/php-api-library\\&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;p&gt;In your PHP script, make sure you include the autoloader:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Include the autoloader&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;require __DIR__ . &#039;\\\\\\\/vendor\\\\\\\/autoload.php&#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;p&gt;Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-php-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Set up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;php&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;use Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\Amount;\\\\nuse Adyen\\\\\\\\Model\\\\\\\\Checkout\\\\\\\\CreateCheckoutSessionRequest;\\\\nuse Adyen\\\\\\\\Service\\\\\\\\Checkout\\\\\\\\PaymentsApi;\\\\n\\\\n\\\\\\\/\\\\\\\/ Include your idempotency key when you make an API request.\\\\n$requestOptions[&#039;idempotencyKey&#039;] = \\\\&amp;quot;YOUR_IDEMPOTENCY_KEY\\\\&amp;quot;;\\\\n\\\\n\\\\\\\/\\\\\\\/ Set up the client and service.\\\\n$client = new \\\\\\\\Adyen\\\\\\\\Client();\\\\n$client-&amp;gt;setXApiKey(&#039;ADYEN_API_KEY&#039;);\\\\n$client-&amp;gt;setEnvironment(\\\\\\\\Adyen\\\\\\\\Environment::TEST);\\\\n\\\\n$service = new PaymentsApi($client);&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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;.NET standard 2.0 or later.&lt;\\\/li&gt;\\n&lt;li&gt;For Terminal API certificate validation, set the application to either of the following:\\n&lt;ul&gt;\\n&lt;li&gt;.NET core 2.1 or later&lt;\\\/li&gt;\\n&lt;li&gt;.NET framework 4.6.1 or later&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/www.nuget.org\\\/packages\\\/Adyen\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;NuGet&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#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;PM&amp;gt; Install-Package Adyen -Version LATEST_VERSION\\&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;p&gt;Alternatively, you can download the\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-dotnet-api-library\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Set up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;cs\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;using Adyen;\\\\nusing Adyen.Model.Checkout;\\\\nusing Adyen.Service.Checkout;\\\\nusing Environment = Adyen.Model.Environment;\\\\n\\\\nclass Program\\\\n{\\\\n    static void Main()\\\\n    {\\\\n        \\\\\\\/\\\\\\\/ Set up the client and service.\\\\n        var config = new Config\\\\n        {\\\\n            XApiKey = \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;,\\\\n            Environment = Environment.Test\\\\n        };\\\\n        var client = new Client(config);\\\\n        var checkout = new PaymentsService(client);\\\\n\\\\n        \\\\\\\/\\\\\\\/ Include your idempotency key when you make an API request.\\\\n        var requestOptions = new Adyen.Model.RequestOptions { IdempotencyKey = \\\\\\&quot;YOUR_IDEMPOTENCY_KEY\\\\\\&quot; };\\\\n    }\\\\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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;NodeJS&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/node-js\\\/gitpod-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-node-online-payments#checkout-example\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/node-js\\\/github-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-node-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Node.js version 18 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/www.npmjs.com\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;npm&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#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;npm install --save @adyen\\\\\\\/api-library\\\\nnpm update @adyen\\\\\\\/api-library\\&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;p&gt;Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-node-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Setting up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;js\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;\\\\\\\/\\\\\\\/ Require the parts of the module you want to use.\\\\nconst { Client, CheckoutAPI, Types} = require(\\\\\\&quot;@adyen\\\\\\\/api-library\\\\\\&quot;);\\\\n\\\\n\\\\\\\/\\\\\\\/ Set up the client and service.\\\\nconst client = new Client({ apiKey: \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;, environment: \\\\\\&quot;TEST\\\\\\&quot; });\\\\nconst checkoutApi = new CheckoutAPI(client);\\\\n\\\\n\\\\\\\/\\\\\\\/ Include your idempotency key when you make an API request.\\\\nconst requestOptions = { idempotencyKey: \\\\\\&quot;YOUR_IDEMPOTENCY_KEY\\\\\\&quot; };\\&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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/go\\\/gitpod-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-golang-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/go\\\/github-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-golang-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Go 1.13 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/golang\\\/go\\\/wiki\\\/Modules\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Go modules&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;shell\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;go get github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/vLATEST_VERSION\\&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;p&gt;Alternatively, you can download the\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-go-api-library\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Set up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;go\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;package main\\\\n\\\\nimport (\\\\n\\\\t\\\\\\&quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/vLATEST_VERSION\\\\\\\/src\\\\\\\/adyen\\\\\\&quot;\\\\n\\\\t\\\\\\&quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/vLATEST_VERSION\\\\\\\/src\\\\\\\/checkout\\\\\\&quot;\\\\n\\\\t\\\\\\&quot;github.com\\\\\\\/adyen\\\\\\\/adyen-go-api-library\\\\\\\/vLATEST_VERSION\\\\\\\/src\\\\\\\/common\\\\\\&quot;\\\\n)\\\\n\\\\n\\\\\\\/\\\\\\\/ Create a payment object.\\\\n\\\\nfunc main () {\\\\n\\\\tclient := adyen.NewClient(&amp;amp;common.Config{\\\\n\\\\t\\\\tApiKey: \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;,\\\\n\\\\t\\\\tEnvironment: common.TestEnv,\\\\n\\\\t})\\\\n\\\\tservice := client.Checkout()\\&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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/python\\\/gitpod-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-python-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/python\\\/github-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-python-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Python 3.6 or later.&lt;\\\/li&gt;\\n&lt;li&gt;(Optional) Packages: Requests or PycURL&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use\\u00a0&lt;a href=\\&quot;https:\\\/\\\/pip.pypa.io\\\/en\\\/stable\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;pip&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;py\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;pip install Adyen\\&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;p&gt;Alternatively, you can download the\\u00a0&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-python-api-library\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;h4&gt;Set up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;py\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;import Adyen\\\\n\\\\n# Set up the client and service.\\\\nadyen = Adyen.Adyen()\\\\nadyen.client.xapikey = \\\\\\&quot;ADYEN_API_KEY\\\\\\&quot;\\\\nadyen.client.platform = \\\\\\&quot;test\\\\\\&quot; # The environment that the library is used in.\\&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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;\\n&lt;div class=\\&quot;additional-info-block output-inline\\&quot;&gt;\\n&lt;h5 class=\\&quot;article__heading additional-info-block__title\\&quot;&gt;Try our example integration&lt;\\\/h5&gt;&lt;div class=\\&quot;additional-info-block__body\\&quot;&gt;&lt;p&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/ruby\\\/gitpod-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-rails-online-payments#run-this-integration-in-seconds-using-gitpod\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Run it in Gitpod&lt;\\\/a&gt;. &lt;br&gt;&lt;img src=\\&quot;\\\/reuse\\\/development-resources\\\/install-api-library\\\/ruby\\\/github-icon.png\\&quot; alt=\\&quot;\\&quot; \\\/&gt;&amp;nbsp;&amp;nbsp;&lt;a href=\\&quot;https:\\\/\\\/github.com\\\/adyen-examples\\\/adyen-rails-online-payments\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Clone the repository&lt;\\\/a&gt;.&lt;\\\/p&gt;&lt;\\\/div&gt;&lt;\\\/div&gt;\\n\\n&lt;h4&gt;Requirements&lt;\\\/h4&gt;\\n&lt;ul&gt;\\n&lt;li&gt;Ruby 2.7 or later.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;h4&gt;Installation&lt;\\\/h4&gt;\\n&lt;p&gt;You can use &lt;a href=\\&quot;https:\\\/\\\/rubygems.org\\\/\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;RubyGems&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Install the API library&#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;gem install adyen-ruby-api-library\\&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;p&gt;Alternatively, you can download the &lt;a href=\\&quot;https:\\\/\\\/github.com\\\/Adyen\\\/adyen-ruby-api-library\\\/releases\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;release on GitHub&lt;\\\/a&gt;.&lt;\\\/p&gt;\\n&lt;p&gt;Run &lt;code&gt;bundle install&lt;\\\/code&gt; to install dependencies.&lt;\\\/p&gt;\\n&lt;h4&gt;Set up the client&lt;\\\/h4&gt;\\n&lt;p&gt;Create a singleton resource that you use for the API requests to Adyen:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;Set up your client&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;ruby&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;require &#039;adyen-ruby-api-library&#039;\\\\n\\\\n# Set up the client and service.\\\\nadyen = Adyen::Client.new\\\\nadyen.api_key = &#039;ADYEN_API_KEY&#039;\\\\nadyen.env = :test # The environment that the library is used in.&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&quot;,&quot;altTitle&quot;:null,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='false'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h3 id=\"create-payment-session\">Create a session<\/h3>\n<!-- REVIEW [andresr]: To help connect the dots, recommend stating the intent of the session object \u2014 it is used to authorize Drop-in to create a payment. Hyperlink to #configure where the session comes back into play. Also: \"Is the payment flow initiated by the shopper? How is it initiated?\" \u2014 consider calling back to step 2 in #payment-flow. -->\n<p>A payment session is a resource with information about a payment flow initiated by the shopper. This resource has all the information required to handle all the stages of a payment flow. You can configure this resource with information like available payment methods, payment amount, or line items.<\/p>\n<p>To create a payment session, make a  <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<p><strong>Request headers:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Header<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>x-api-key<\/code><\/td>\n<td><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>Your Adyen API key for authentication.<\/td>\n<\/tr>\n<tr>\n<td><code>idempotency-key<\/code><\/td>\n<td><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>A unique identifier for the request. This is used to prevent duplicate requests from being processed.<\/td>\n<\/tr>\n<tr>\n<td><code>content-type<\/code><\/td>\n<td><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>The content type of the request. Set to <strong>application\/json<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><strong>Request body:<\/strong><\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter name<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>merchantAccount<\/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>Your merchant account name.<\/td>\n<\/tr>\n<tr>\n<td><code>amount<\/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>The\u00a0<code>currency<\/code>\u00a0and\u00a0<code>value<\/code>\u00a0of the payment, in <a href=\"\/development-resources\/currency-codes\">minor units<\/a>. This is used to filter the list of available payment methods to your shopper.<\/td>\n<\/tr>\n<tr>\n<td><code>returnUrl<\/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>URL to where the shopper should be taken back to after a redirection.   <br> If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value. <br> <div class=\"sc-notice note\"><div> The URL must not include personally identifiable information (PII), for example name or email address. <\/div><\/div><\/td>\n<\/tr>\n<tr>\n<td><code>reference<\/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>Your unique reference for the payment. Minimum length: three characters.<\/td>\n<\/tr>\n<tr>\n<td><code>countryCode<\/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>The shopper's country code. This is used to filter the list of available payment methods to your shopper. If not set, setting the <code>locale<\/code> is required in the front-end <a href=\"#configure\">global configuration<\/a>.<\/td>\n<\/tr>\n<tr>\n<td><code>shopperEmail<\/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>The shopper's email address. Strongly recommended because this field is used in a number of <a href=\"\/risk-management\/configure-your-risk-profile\/risk-field-reference\">risk checks<\/a>, and for 3D Secure.<\/td>\n<\/tr>\n<tr>\n<td><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>Your unique reference for the shopper. Do not include personally identifiable information (PII), such as name or email address. <br> <strong>Format:<\/strong> <ul><li markdown=\"1\">Minimum length: 3 characters.<\/li><li markdown=\"1\">Case-sensitive.<\/li><\/ul> This field is used for the following: <ul><li markdown=\"1\">Risk checks.<\/li><li markdown=\"1\">When storing the shopper's payment details: associating the token with the shopper.<\/li><\/ul><\/td>\n<\/tr>\n<tr>\n<td><code>channel<\/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>The platform where the payment is taking place. Use <strong>Web<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div class=\"notices green\">\n<p>For a request that uses <a href=\"\/standard\/integration\/drop-in\/tokenization\">tokenization<\/a>, you must include additional parameters.<\/p>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example of a request to create a session for a payment of 10 EUR'\" :id=\"'sessions-web-standard'\" :code-data=\"[{&quot;language&quot;:&quot;bash&quot;,&quot;tabTitle&quot;:&quot;curl&quot;,&quot;content&quot;:&quot;curl https:\\\/\\\/checkout-test.adyen.com\\\/v72\\\/sessions \\\\\\n-H 'x-api-key: ADYEN_API_KEY' \\\\\\n-H \\&quot;idempotency-key: YOUR_IDEMPOTENCY_KEY\\&quot; \\\\\\n-H 'content-type: application\\\/json' \\\\\\n-d '{\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_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\\&quot;,\\n  \\&quot;countryCode\\&quot;: \\&quot;NL\\&quot;,\\n  \\&quot;shopperEmail\\&quot;: \\&quot;s.hopper@example.com\\&quot;,\\n  \\&quot;shopperReference\\&quot;: \\&quot;Your-shopper-reference-890-xyz\\&quot;,\\n  \\&quot;channel\\&quot;: \\&quot;Web\\&quot;\\n}'&quot;},{&quot;language&quot;:&quot;java&quot;,&quot;tabTitle&quot;:&quot;Java&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Java API Library v27.0.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(\\&quot;ADYEN_API_KEY\\&quot;, Environment.TEST);\\n\\n\\\/\\\/ Create the request object(s)\\nAmount amount = new Amount()\\n  .currency(\\&quot;EUR\\&quot;)\\n  .value(1000L);\\n\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest()\\n  .reference(\\&quot;YOUR_PAYMENT_REFERENCE\\&quot;)\\n  .amount(amount)\\n  .merchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  .countryCode(\\&quot;NL\\&quot;)\\n  .returnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  .channel(CreateCheckoutSessionRequest.ChannelEnum.WEB)\\n  .shopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  .shopperReference(\\&quot;Your-shopper-reference-890-xyz\\&quot;);\\n\\n\\\/\\\/ Send the request\\nPaymentsApi service = new PaymentsApi(client);\\nCreateCheckoutSessionResponse response = service.sessions(createCheckoutSessionRequest, new RequestOptions().idempotencyKey(\\&quot;UUID\\&quot;));&quot;},{&quot;language&quot;:&quot;php&quot;,&quot;tabTitle&quot;:&quot;PHP&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen PHP API Library v19.0.0\\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-&gt;setXApiKey(\\&quot;ADYEN_API_KEY\\&quot;);\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\n$client-&gt;setEnvironment(Environment::TEST);\\n\\n\\n\\\/\\\/ Create the request object(s)\\n$amount = new Amount();\\n$amount\\n  -&gt;setCurrency(\\&quot;EUR\\&quot;)\\n  -&gt;setValue(1000);\\n\\n$createCheckoutSessionRequest = new CreateCheckoutSessionRequest();\\n$createCheckoutSessionRequest\\n  -&gt;setReference(\\&quot;YOUR_PAYMENT_REFERENCE\\&quot;)\\n  -&gt;setAmount($amount)\\n  -&gt;setMerchantAccount(\\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;)\\n  -&gt;setCountryCode(\\&quot;NL\\&quot;)\\n  -&gt;setReturnUrl(\\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;)\\n  -&gt;setChannel(\\&quot;Web\\&quot;)\\n  -&gt;setShopperEmail(\\&quot;s.hopper@example.com\\&quot;)\\n  -&gt;setShopperReference(\\&quot;Your-shopper-reference-890-xyz\\&quot;);\\n\\n$requestOptions['idempotencyKey'] = 'UUID';\\n\\n\\\/\\\/ Send the request\\n$service = new PaymentsApi($client);\\n$response = $service-&gt;sessions($createCheckoutSessionRequest, $requestOptions);&quot;},{&quot;language&quot;:&quot;cs&quot;,&quot;tabTitle&quot;:&quot;C#&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen .net API Library v17.0.0\\nusing Adyen;\\nusing Environment = Adyen.Model.Environment;\\nusing Adyen.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 = \\&quot;ADYEN_API_KEY\\&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 = \\&quot;EUR\\&quot;,\\n  Value = 1000\\n};\\n\\nCreateCheckoutSessionRequest createCheckoutSessionRequest = new CreateCheckoutSessionRequest\\n{\\n  Reference = \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  Amount = amount,\\n  MerchantAccount = \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode = \\&quot;NL\\&quot;,\\n  ReturnUrl = \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  Channel = CreateCheckoutSessionRequest.ChannelEnum.Web,\\n  ShopperEmail = \\&quot;s.hopper@example.com\\&quot;,\\n  ShopperReference = \\&quot;Your-shopper-reference-890-xyz\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nvar service = new PaymentsService(client);\\nvar response = service.Sessions(createCheckoutSessionRequest, requestOptions: new RequestOptions { IdempotencyKey = \\&quot;UUID\\&quot;});&quot;},{&quot;language&quot;:&quot;go&quot;,&quot;tabTitle&quot;:&quot;Go&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Go API Library v10.4.0\\nimport (\\n  \\&quot;context\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/common\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/adyen\\&quot;\\n  \\&quot;github.com\\\/adyen\\\/adyen-go-api-library\\\/v9\\\/src\\\/checkout\\&quot;\\n)\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nclient := adyen.NewClient(&amp;common.Config{\\n  ApiKey:      \\&quot;ADYEN_API_KEY\\&quot;,\\n  Environment: common.TestEnv,\\n})\\n\\n\\\/\\\/ Create the request object(s)\\namount := checkout.Amount{\\n  Currency: \\&quot;EUR\\&quot;,\\n  Value: 1000,\\n}\\n\\ncreateCheckoutSessionRequest := checkout.CreateCheckoutSessionRequest{\\n  Reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  Amount: amount,\\n  MerchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  CountryCode: common.PtrString(\\&quot;NL\\&quot;),\\n  ReturnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  Channel: common.PtrString(\\&quot;Web\\&quot;),\\n  ShopperEmail: common.PtrString(\\&quot;s.hopper@example.com\\&quot;),\\n  ShopperReference: common.PtrString(\\&quot;Your-shopper-reference-890-xyz\\&quot;),\\n}\\n\\n\\\/\\\/ Send the request\\nservice := client.Checkout()\\nreq := service.PaymentsApi.SessionsInput().IdempotencyKey(\\&quot;UUID\\&quot;).CreateCheckoutSessionRequest(createCheckoutSessionRequest)\\nres, httpRes, err := service.PaymentsApi.Sessions(context.Background(), req)&quot;},{&quot;language&quot;:&quot;py&quot;,&quot;tabTitle&quot;:&quot;Python&quot;,&quot;content&quot;:&quot;# Adyen Python API Library v12.5.1\\nimport Adyen\\n\\nadyen = Adyen.Adyen()\\nadyen.client.xapikey = \\&quot;ADYEN_API_KEY\\&quot;\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.client.platform = \\&quot;test\\&quot; # The environment to use library in.\\n\\n# Create the request object(s)\\njson_request = {\\n  \\&quot;merchantAccount\\&quot;: \\&quot;YOUR_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\\&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-890-xyz\\&quot;\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.sessions(request=json_request, idempotency_key=\\&quot;UUID\\&quot;)&quot;},{&quot;language&quot;:&quot;rb&quot;,&quot;tabTitle&quot;:&quot;Ruby&quot;,&quot;content&quot;:&quot;# Adyen Ruby API Library v9.5.1\\nrequire \\&quot;adyen-ruby-api-library\\&quot;\\n\\nadyen = Adyen::Client.new\\nadyen.api_key = 'ADYEN_API_KEY'\\n# For the live environment, additionally include your liveEndpointUrlPrefix.\\nadyen.env = :test # Set to \\&quot;live\\&quot; for live environment\\n\\n# Create the request object(s)\\nrequest_body = {\\n  :merchantAccount =&gt; 'YOUR_MERCHANT_ACCOUNT',\\n  :amount =&gt; {\\n    :value =&gt; 1000,\\n    :currency =&gt; 'EUR'\\n  },\\n  :returnUrl =&gt; 'https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..',\\n  :reference =&gt; 'YOUR_PAYMENT_REFERENCE',\\n  :countryCode =&gt; 'NL',\\n  :channel =&gt; 'Web',\\n  :shopperEmail =&gt; 's.hopper@example.com',\\n  :shopperReference =&gt; 'Your-shopper-reference-890-xyz'\\n}\\n\\n# Send the request\\nresult = adyen.checkout.payments_api.sessions(request_body, headers: { 'Idempotency-Key' =&gt; 'UUID' })&quot;},{&quot;language&quot;:&quot;ts&quot;,&quot;tabTitle&quot;:&quot;NodeJS (TypeScript)&quot;,&quot;content&quot;:&quot;\\\/\\\/ Adyen Node API Library v18.0.0\\n\\\/\\\/ Require the parts of the module you want to use\\nimport { Client, CheckoutAPI, Types } from \\&quot;@adyen\\\/api-library\\&quot;;\\n\\\/\\\/ Initialize the client object\\n\\\/\\\/ For the live environment, additionally include your liveEndpointUrlPrefix.\\nconst client = new Client({apiKey: \\&quot;ADYEN_API_KEY\\&quot;, environment: \\&quot;TEST\\&quot;});\\n\\n\\\/\\\/ Create the request object(s)\\nconst amount: Types.checkout.Amount = {\\n  currency: \\&quot;EUR\\&quot;,\\n  value: 1000\\n};\\n\\nconst createCheckoutSessionRequest: Types.checkout.CreateCheckoutSessionRequest = {\\n  reference: \\&quot;YOUR_PAYMENT_REFERENCE\\&quot;,\\n  amount: amount,\\n  merchantAccount: \\&quot;YOUR_MERCHANT_ACCOUNT\\&quot;,\\n  countryCode: \\&quot;NL\\&quot;,\\n  returnUrl: \\&quot;https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\&quot;,\\n  channel: Types.checkout.CreateCheckoutSessionRequest.ChannelEnum.Web,\\n  shopperEmail: \\&quot;s.hopper@example.com\\&quot;,\\n  shopperReference: \\&quot;Your-shopper-reference-890-xyz\\&quot;\\n};\\n\\n\\\/\\\/ Send the request\\nconst checkoutAPI = new CheckoutAPI(client);\\nconst response = checkoutAPI.PaymentsApi.sessions(createCheckoutSessionRequest, { idempotencyKey: \\&quot;UUID\\&quot; });&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The response includes the following information that you need for the next steps.<\/p>\n<table>\n<thead>\n<tr>\n<th>Parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>sessionData<\/code><\/td>\n<td>The payment session data you need to pass to your front end.<\/td>\n<\/tr>\n<tr>\n<td><code>id<\/code><\/td>\n<td>A unique identifier for the session data.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'HTTP 201 \/sessions response body'\" :id=\"'sessions-response-web'\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n    \\\"amount\\\": {\\n        \\\"currency\\\": \\\"EUR\\\",\\n        \\\"value\\\": 1000\\n    },\\n    \\\"countryCode\\\": \\\"NL\\\",\\n    \\\"expiresAt\\\": \\\"2021-08-24T13:35:16+02:00\\\",\\n    \\\"id\\\": \\\"CSD9CAC34EBAE225DD\\\",\\n    \\\"merchantAccount\\\": \\\"YOUR_MERCHANT_ACCOUNT\\\",\\n    \\\"reference\\\": \\\"YOUR_PAYMENT_REFERENCE\\\",\\n    \\\"returnUrl\\\": \\\"https:\\\/\\\/your-company.example.com\\\/checkout?shopperOrder=12xy..\\\",\\n    \\\"sessionData\\\": \\\"Ab02b4c..\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div class=\"sc-notice tip\"><div>\n<p><strong>Next step<\/strong>: Pass the <code>id<\/code> and <code>sessionData<\/code> values to your front end. You will use these values when <a href=\"#configure\">creating the AdyenCheckout instance<\/a> on your <a href=\"#client-website\">client website<\/a>.<\/p>\n<\/div><\/div>\n<h3 id=\"api-error-handling\">Handling API errors<\/h3>\n<p>If your  <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 does not get a HTTP 201 response, use the <code>errorCode<\/code> field and the list of <a href=\"\/development-resources\/error-codes\">API error codes<\/a> to troubleshoot.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example HTTP 400 response with an error message'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"status\\\": 400,\\n  \\\"errorCode\\\": \\\"170\\\",\\n  \\\"message\\\": \\\"Invalid merchant account\\\",\\n  \\\"errorType\\\": \\\"validation\\\"\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2 id=\"client-website\">Client website<\/h2>\n<p>This section covers all the client-side implementation required for your Drop-in integration. Complete these steps to set up your client website.<\/p>\n<div class=\"sc-notice note\"><div>\n<p><strong>Prerequisite<\/strong>: Before starting this section, make sure you have completed the <a href=\"#payment-server\">Payment server<\/a> setup and have the <code>id<\/code> and <code>sessionData<\/code> values from the <code>\/sessions<\/code> response.<\/p>\n<\/div><\/div>\n<ul>\n<li><a href=\"#install-adyen-web\">Install Adyen Web<\/a><\/li>\n<li><a href=\"#configure-drop-in\">Configure Drop-in<\/a><\/li>\n<li><a href=\"#handle-payment-result\">Handle payment result<\/a><\/li>\n<\/ul>\n<h3 id=\"install-adyen-web\">Install Adyen Web<\/h3>\n<p>Use the Adyen Web npm package, or embed the Adyen Web script and stylesheet into your HTML file:<\/p>\n\n<div id=\"tabR26Tg\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;npm (recommended)&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;Install the &lt;a href=\\&quot;https:\\\/\\\/www.npmjs.com\\\/package\\\/@adyen\\\/adyen-web\\&quot; target=\\&quot;_blank\\&quot; rel=\\&quot;nofollow noopener noreferrer\\&quot; class=\\&quot;external-link no-image\\&quot;&gt;Adyen Web Node package&lt;\\\/a&gt;:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#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;npm install @adyen\\\\\\\/adyen-web --save\\&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;p&gt;Import Adyen Web into your application:&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;js&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;import { AdyenCheckout, Dropin } from &#039;@adyen\\\\\\\/adyen-web\\\\\\\/auto&#039;;\\\\nimport &#039;@adyen\\\\\\\/adyen-web\\\\\\\/styles\\\\\\\/adyen.css&#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;p&gt;To reduce bundle size, you can &lt;a href=\\&quot;\\\/standard\\\/integration\\\/drop-in\\\/optional-drop-in-configuration#import-drop-in-with-individual-payment-methods\\&quot;&gt;import individual payment methods&lt;\\\/a&gt; instead.&lt;\\\/p&gt;\\n&quot;,&quot;altTitle&quot;:&quot;npm&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;npm&quot;},{&quot;title&quot;:&quot;Embed script and stylesheet&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;Use the &lt;code&gt;integrity&lt;\\\/code&gt; attribute so browsers can verify that the script and stylesheet have not been changed unexpectedly.&lt;\\\/p&gt;\\n&lt;p&gt;The value of the &lt;code&gt;integrity&lt;\\\/code&gt; attribute is the &lt;a href=\\&quot;\\\/online-payments\\\/web-best-practices#implement-subresource-integrity-hashes\\&quot;&gt;Subresource Integrity (SRI) hash&lt;\\\/a&gt; which Adyen provides for each version of the Adyen Web JavaScript and CSS files.&lt;\\\/p&gt;\\n&lt;p&gt;Get the SRI hashes in the &lt;a href=\\&quot;\\\/online-payments\\\/release-notes?integration_type=web\\&quot;&gt;release notes&lt;\\\/a&gt;, under &lt;strong&gt;Updating to this version&lt;\\\/strong&gt;.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n    &lt;code-sample :title=\\&quot;&#039;checkout.html&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=&#039;[{\\&quot;language\\&quot;:\\&quot;html\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;&lt;!-- Embed the Adyen Web script element above any other JavaScript in your checkout page. --&gt;\\\\n&amp;lt;script src=\\\\\\&quot;https:\\\\\\\/\\\\\\\/checkoutshopper-test.cdn.adyen.com\\\\\\\/sdk\\\\\\\/VERSION\\\\\\\/adyen.js\\\\\\&quot;\\\\n   integrity=\\\\\\&quot;JS_INTEGRITY_HASH_FOR_YOUR_VERSION\\\\\\&quot;\\\\n   crossorigin=\\\\\\&quot;anonymous\\\\\\&quot;&amp;gt;&amp;lt;\\\\\\\/script&amp;gt;\\\\n\\\\n&lt;!-- Embed the Adyen Web stylesheet. You can add your own styling by overriding the rules in the CSS file --&gt;\\\\n&amp;lt;link rel=\\\\\\&quot;stylesheet\\\\\\&quot; href=\\\\\\&quot;https:\\\\\\\/\\\\\\\/checkoutshopper-test.cdn.adyen.com\\\\\\\/checkoutshopper\\\\\\\/sdk\\\\\\\/VERSION\\\\\\\/adyen.css\\\\\\&quot;\\\\n    integrity=\\\\\\&quot;CSS_INTEGRITY_HASH_FOR_YOUR_VERSION\\\\\\&quot;\\\\n    crossorigin=\\\\\\&quot;anonymous\\\\\\&quot;&amp;gt;\\&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&quot;,&quot;altTitle&quot;:&quot;script&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;script&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h3 id=\"create-container-element\">Create a container element<\/h3>\n<!-- REVIEW [andresr]: Does the Drop-in's appearance depend on the styling and display properties of this div? For example, does the Drop-in render at the same width as this container? Or is it just where the Drop-in appears when it is instantiated? -->\n<p>Create a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Document_Object_Model\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Document Object Model (DOM)<\/a> container element in your HTML where you want the Drop-in UI to appear. <\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example HTML container element'\" :id=\"''\" :code-data='[{\"language\":\"html\",\"tabTitle\":\"\",\"content\":\"&lt;div id=\\\"dropin-container\\\"&gt;&lt;\\\/div&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h3>Create Drop-in<\/h3>\n<!-- REVIEW [andresr]: Confused on this part since it mentions that Drop-in consists of 2 properties (AdyenCheckout and Dropin), but the \"Create an instance of Drop-in\" code sample has AdyenCheckout and the drop-in configuration object as properties. Is this describing the overall SDK package? -->\n<p>Drop-in consists of the following:<\/p>\n<ul>\n<li><code>AdyenCheckout<\/code>: represents one payment <a href=\"#create-payment-session\">session<\/a>.<\/li>\n<li><code>Dropin<\/code>: represents the interface that the shopper interacts with to make a payment.<\/li>\n<\/ul>\n<p>With the <code>AdyenCheckout<\/code> instance, you can create a <code>Dropin<\/code> instance.<\/p>\n<h4 id=\"configure\">Create your instance of AdyenCheckout<\/h4>\n<p>Create a global configuration object that you use to create the instance of <code>AdyenCheckout<\/code>. The object contains global configuration parameters and event handlers.<\/p>\n<ol>\n<li>\n<p>Add configuration parameters.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Parameter name<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>session<\/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>The payment session object from 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> response. It includes <code>session.id<\/code> and <code>session.sessionData<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>environment<\/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>Use <strong>test<\/strong>. When you are ready to accept live payments, change the value to one of our <a href=\"#test-and-go-live\">live environments<\/a>.\u00a0<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>amount<\/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>An object representing the amount to be displayed on the <strong>Pay<\/strong> Button. Its properties are <code>value<\/code> (the amount in the currencies smallest unit, for example cents for EUR) and <code>currency<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>countryCode<\/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>The shopper's country code. This is used to filter the list of available payment methods to your shopper.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>locale<\/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>The language used in the Drop-in UI. For possible values, see the <a href=\"https:\/\/github.com\/Adyen\/adyen-web\/tree\/main\/packages\/server\/translations\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">list of available languages<\/a>. <br> By default, this is the either the <code>shopperLocale<\/code> from your <code>\/sessions<\/code> request or, if this locale is not available on Drop-in, <strong>en-US<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p><br><\/p>\n<\/li>\n<li>\n<p>Add event handlers, to handle events that get triggered during the payment.<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Event handler name<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>onPaymentCompleted(result, component)<\/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>Create an event handler, called when the payment is completed.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>onPaymentFailed(result, component)<\/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>Create an event handler, called when the payment failed. A failed payment has result code <strong>Cancelled<\/strong>, <strong>Error<\/strong> or <strong>Refused<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>onError(error)<\/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>Create an event handler, called when an <a href=\"#handling-drop-in-errors\">error occurs in Drop-in<\/a>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Combine the configuration parameters and event handlers into your global configuration object.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example of a global configuration object for a payment session with the amount of EUR 10'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const globalConfiguration = {\\n  session: {\\n    id: 'CSD9CAC3...', \\\/\\\/ Unique identifier for the payment session.\\n    sessionData: 'Ab02b4c...' \\\/\\\/ The payment session data.\\n  },\\n  environment: 'test', \\\/\\\/ Change to 'live' for the live environment.\\n  amount: {\\n    value: 1000,\\n    currency: 'EUR'\\n  },\\n  locale: 'nl-NL',\\n  countryCode: 'NL',\\n  clientKey: 'test_870be2...', \\\/\\\/ Public key used for client-side authentication: https:\\\/\\\/docs.adyen.com\\\/development-resources\\\/client-side-authentication\\n  onPaymentCompleted: (result, component) =&gt; {\\n    console.info(result, component);\\n  },\\n  onPaymentFailed: (result, component) =&gt; {\\n    console.info(result, component);\\n  },\\n  onError: (error, component) =&gt; {\\n    console.error(error.name, error.message, error.stack, component);\\n  }\\n};&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p><br><\/p>\n<\/li>\n<li>\n<p>Use this global configuration object to create an instance of <code>AdyenCheckout<\/code>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Create an instance of AdyenCheckout'\" :id=\"''\" :code-data='[{\"language\":\"javascript\",\"tabTitle\":\"\",\"content\":\"\\\/\\\/ All of the resources that you imported are properties of the window.\\n\\\/\\\/ In this example you imported Card, GooglePay, and Paypal individually.\\nconst { AdyenCheckout, Dropin, Card, GooglePay, PayPal  } = window.AdyenWeb;\\n\\nconst yourAdyenCheckout = await AdyenCheckout(globalConfiguration);\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div class=\"sc-notice note\"><div>\n<p><strong>Initializing in a reactive framework<\/strong><br \/>\nModern frameworks can re-render UI components, which can cause unexpected behavior in the checkout. As a rule, <a href=\"\/online-payments\/web-best-practices#handle-web-framework-re-renders\">initialize <code>AdyenCheckout<\/code> and mount your Components only once<\/a> when you are ready to display the payment methods.<\/p>\n<\/div><\/div>\n<\/li>\n<\/ol>\n<h4 id=\"create-instance\">Create your instance of Drop-in<\/h4>\n<ol>\n<li>\n<p>(Optional) Add <a href=\"\/standard\/integration\/drop-in\/optional-drop-in-configuration\">configuration that is specific to Drop-in<\/a>. This configuration is a different object than the global configuration. You pass this specific Drop-in configuration object when you create your instance of <code>Dropin<\/code>.<\/p>\n<\/li>\n<li>\n<p><span id=\"create-and-mount-instance\">Create an instance of Drop-in<\/span>, passing the following:<\/p>\n<table>\n<thead>\n<tr>\n<th>Argument<\/th>\n<th>Required<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>AdyenCheckout<\/code> object<\/td>\n<td><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>The <a href=\"#configure\">instance of <code>AdyenCheckout<\/code><\/a> that you configured and created.<\/td>\n<\/tr>\n<tr>\n<td>Drop-in configuration object<\/td>\n<td><\/td>\n<td>The Drop-in configuration object that you created.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Create an instance of Drop-in'\" :id=\"''\" :code-data='[{\"language\":\"js\",\"tabTitle\":\"\",\"content\":\"const yourDropin = new Dropin(yourAdyenCheckout, dropinConfiguration);\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<p><br><\/p>\n<ol start=\"3\">\n<li>\n<p>Mount the Drop-in to the <a href=\"#create-container-element\">DOM element that you created<\/a>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Create an instance of Drop-in'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;yourDropin.mount('#dropin-container');&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div class=\"accordion-shortcode adl-accordion adl-accordion--max-height-transition\" data-expand=\"true\" data-ignore=\"anchorjs-link\">\n    \n    <div class=\"adl-accordion__item\" style=\"\">\n        <div tabindex=\"0\" role=\"item\" aria-expanded=\"false\" class=\"adl-accordion__header\">\n            <i class=\"adl-accordion__toggle adl-icon-chevron-down\"><\/i>\n            <div class=\"adl-accordion__title-wrapper\" data-accordion=\"#drop-in-methods\">\n                                    <h4 class=\"adl-accordion__title\">Drop-in methods<\/h4>\n                            <\/div>\n        <\/div>\n        <div role=\"region\" class=\"adl-accordion__content\">\n            \n<p>You can call the following methods from <a href=\"#create-instance\">your instance of Drop-in<\/a>:<\/p>\n<table>\n<thead>\n<tr>\n<th>Method name<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>mount(selector)<\/code><\/td>\n<td>Mounts the Drop-in into the DOM returned by the <code>selector<\/code>. <br> The <code>selector<\/code> must be either a <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Document\/querySelector#parameters\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">valid CSS selector string<\/a> or an <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/HTMLElement\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">HTMLElement<\/a> reference.<\/td>\n<\/tr>\n<tr>\n<td><code>unmount()<\/code><\/td>\n<td>Unmounts the Drop-in from the DOM. We recommend to unmount in case the payment amount changes after the initial mount.<\/td>\n<\/tr>\n<tr>\n<td><code>closeActivePaymentMethod()<\/code><\/td>\n<td>Closes a selected payment method, for example if you want to reset the Drop-in.<\/td>\n<\/tr>\n<tr>\n<td><code>update()<\/code><\/td>\n<td>Updates the properties and remounts Drop-in into the DOM, for example, if you want to change the properties of the configuration object after Drop-in is mounted.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n\n        <\/div>\n    <\/div>\n<\/div>\n\n<\/li>\n<\/ol>\n<h3 id=\"initialize\">Handle the payment<\/h3>\n<p>After you create and mount Drop-in, the shopper interacts with the interface to choose a payment method, enter their details in the payment form, and submit the payment.<\/p>\n<p>What you must handle depends on the payment:<\/p>\n<ul>\n<li>If the payment does not require a redirect, Drop-in handles the complete payment flow. You can <a href=\"#get-the-payment-outcome\">get the payment outcome<\/a>.<\/li>\n<li>If the payment requires a redirect, you must <a href=\"#handle-the-redirect\">handle it<\/a>.<\/li>\n<\/ul>\n<h4 id=\"handle-the-redirect\">Handle the redirect<\/h4>\n<p>Some payment methods or flows (for example: iDEAL and redirect 3D Secure 2 authentication) redirect the shopper to another website to complete the payment. <\/p>\n<p>When the shopper completes the payment on the other website, they get redirected back to your website (the <code>returnUrl<\/code> you specified when you <a href=\"#create-payment-session\">created the payment session<\/a>) with <a href=\"https:\/\/en.wikipedia.org\/wiki\/Query_string\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">query parameters<\/a> appended to it. <\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example return URL with appended query parameters'\" :id=\"''\" :code-data='[{\"language\":\"curl\",\"tabTitle\":\"\",\"content\":\"https:\\\/\\\/your-company.example.com\\\/?sessionId=CSD9CAC34EBAE225DD&amp;redirectResult=X6XtfGC3!Y...\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div class=\"notices yellow\">\n<p>If the shopper does not return to your website, you do not get the return URL with parameters appended to it. You do not need to handle the redirect. Instead, wait for the <a href=\"#get-payment-outcome\">webhook message<\/a> that we send to your server.<\/p>\n<\/div>\n<ol>\n<li>\n<p>Extract the following query parameters:<\/p>\n<table>\n<thead>\n<tr>\n<th>Query parameter<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>sessionId<\/code><\/td>\n<td>The unique identifier for the shopper's payment session.<\/td>\n<\/tr>\n<tr>\n<td><code>redirectResult<\/code><\/td>\n<td>Details you need to submit to handle the redirect.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<\/li>\n<li>\n<p>Create a configuration object with the <code>sessionId<\/code>.<\/p>\n<\/li>\n<li>\n<p>Create instance of <code>AdyenCheckout<\/code>, passing the configuration object that you created.<\/p>\n<\/li>\n<li>\n<p>Call <code>submitDetails(details)<\/code>, passing the <code>redirectResult<\/code> value that you extracted from the return URL.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example code to handle the redirect'\" :id=\"''\" :code-data='[{\"language\":\"js\",\"tabTitle\":\"\",\"content\":\"\\\/\\\/ Create a configuration object with the sessionId.\\nconst configurationWithSessionId = {\\n  sessionId: \\\"CSD9CAC34EBAE225DD\\\"\\n};  \\n\\n\\\/\\\/ Create an instance of AdyenCheckout, passing the configuration object that you created.\\nconst yourAdyenCheckout = await AdyenCheckout(configurationWithSessionId);\\n\\n  \\\/\\\/ Call submitDetails, passing the redirectResult value that you extracted from the return URL.\\nyourAdyenCheckout.submitDetails({ details: { redirectResult: redirectResult } });\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p><a href=\"#get-the-payment-outcome\">Get the payment outcome<\/a>.<\/p>\n<\/li>\n<\/ol>\n<h3 id=\"get-the-payment-outcome\">Get the payment outcome<\/h3>\n<p>After Drop-in finishes the payment flow, you can inform the shopper about the current payment status. Adyen sends a webhook message with the outcome of the payment to your <a href=\"#webhook-server\">webhook server<\/a>.<\/p>\n<h4 id=\"inform-the-shopper\">Inform the shopper<\/h4>\n<p>Depending on whether the payment was successful, the <code>onPaymentCompleted<\/code> or <code>onPaymentFailed<\/code> event is triggered.<\/p>\n<p>From the relevant event, you can get the <code>resultCode<\/code> to inform the shopper about the current payment status.<\/p>\n<p>You can optionally <a href=\"#get-session-result-server\">get the result of the payment session on your payment server<\/a>.<\/p>\n<h3 id=\"handling-drop-in-errors\">Handling Drop-in errors<\/h3>\n<p><span id=\"handle-errors\">If an error occurs, the <code>onError<\/code> event returns an object which contains details about the error:<\/span><\/p>\n<table>\n<thead>\n<tr>\n<th>Error field<\/th>\n<th>Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><code>error.name<\/code><\/td>\n<td>The type of error. Use the values it returns to configure localized error messages for your shoppers: <ul> <li markdown=\"1\"><strong>NETWORK_ERROR<\/strong>: a call that Drop-in made to the server has failed, for example because of a timeout, or if there is missing information in the request. Ask the shopper to try again.<\/li> <li markdown=\"1\"><strong>CANCEL<\/strong>: the shopper canceled the payment. Only applies for payment methods that allow explicit cancellation in the UI, for example Apple Pay or PayPal.<\/li> <li markdown=\"1\"><strong>IMPLEMENTATION_ERROR<\/strong>: the method or parameter is incorrect or not supported.<\/li> <li markdown=\"1\"><strong>ERROR<\/strong>: generic catch-all error. Tell the shopper something went wrong and ask them to try paying again, maybe with a different payment method.<\/li> <\/ul><\/td>\n<\/tr>\n<tr>\n<td><code>error.message<\/code><\/td>\n<td>Gives more information for each type of error. The message is technical so you shouldn't show it to your shoppers. <br> For <code>error.name<\/code>: <strong>NETWORK_ERROR<\/strong>, the information in the <code>message<\/code> field depends on the environment: <ul> <li markdown=\"1\"><strong>test<\/strong>: you get a message with a <a href=\"\/development-resources\/error-codes#generic-error-codes\">generic error code<\/a> to help you troubleshoot.<\/li> <li markdown=\"1\"><strong>live<\/strong>: the message from the response.<\/li> <\/ul><\/td>\n<\/tr>\n<tr>\n<td><code>component<\/code><\/td>\n<td>The name of the variable where you <a href=\"#create-and-mount-instance\">created the instance of Drop-in<\/a>, for example <strong>yourDropin<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The <code>error<\/code> object can contain additional fields inherited from the <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/JavaScript\/Reference\/Global_Objects\/Error\/Error\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">JavaScript <code>Error()<\/code> constructor<\/a>.<\/p>\n<h2 id=\"webhook-server\">Webhook server<\/h2>\n<p>This section covers your webhook server. It includes information about the webhook messages that you receive about payment outcomes.<\/p>\n<div class=\"sc-notice note\"><div>\n<p><strong>Prerequisite<\/strong>: Make sure that you have set up webhook in your Customer Area and subscribed to the standard webhook with default event codes.<\/p>\n<\/div><\/div>\n<h3 id=\"update-your-order-management-system\">Update your order management system<\/h3>\n<p>Update your order management system when you get the outcome in a <a href=\"\/development-resources\/webhooks\">webhook message<\/a> with <code>eventCode<\/code>: <strong>AUTHORISATION<\/strong>. Use the <code>merchantReference<\/code> from the webhook to match it to your order reference.<\/p>\n<p>The <code>merchantReference<\/code> corresponds to the <code>reference<\/code> you provided when <a href=\"#create-payment-session\">creating the payment session<\/a> on your payment server.<\/p>\n<p>For a successful payment, the event contains <code>success<\/code>: <strong>true<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example webhook for a successful payment'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"live\\\": \\\"false\\\",\\n  \\\"notificationItems\\\":[\\n    {\\n      \\\"NotificationRequestItem\\\":{\\n        \\\"eventCode\\\":\\\"AUTHORISATION\\\",\\n        \\\"merchantAccountCode\\\":\\\"ADYEN_MERCHANT_ACCOUNT\\\",\\n        \\\"reason\\\":\\\"033899:1111:03\\\/2030\\\",\\n        \\\"amount\\\":{\\n          \\\"currency\\\":\\\"EUR\\\",\\n          \\\"value\\\":2500\\n        },\\n        \\\"operations\\\":[\\\"CANCEL\\\",\\\"CAPTURE\\\",\\\"REFUND\\\"],\\n        \\\"success\\\":\\\"true\\\",\\n        \\\"paymentMethod\\\":\\\"mc\\\",\\n        \\\"additionalData\\\":{\\n          \\\"expiryDate\\\":\\\"03\\\/2030\\\",\\n          \\\"authCode\\\":\\\"033899\\\",\\n          \\\"cardBin\\\":\\\"411111\\\",\\n          \\\"cardSummary\\\":\\\"1111\\\",\\n          \\\"checkoutSessionId\\\":\\\"CSF46729982237A879\\\"\\n        },\\n        \\\"merchantReference\\\":\\\"YOUR_REFERENCE\\\",\\n        \\\"pspReference\\\":\\\"NC6HT9CRT65ZGN82\\\",\\n        \\\"eventDate\\\":\\\"2021-09-13T14:10:22+02:00\\\"\\n      }\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>For an unsuccessful payment, you get <code>success<\/code>: <strong>false<\/strong>, and the <code>reason<\/code> field has details about why the payment was unsuccessful.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Example webhook for an unsuccessful payment'\" :id=\"''\" :code-data='[{\"language\":\"json\",\"tabTitle\":\"\",\"content\":\"{\\n  \\\"live\\\": \\\"false\\\",\\n  \\\"notificationItems\\\":[\\n    {\\n      \\\"NotificationRequestItem\\\":{\\n        \\\"eventCode\\\":\\\"AUTHORISATION\\\",\\n        \\\"merchantAccountCode\\\":\\\"ADYEN_MERCHANT_ACCOUNT\\\",\\n        \\\"reason\\\":\\\"validation 101 Invalid card number\\\",\\n        \\\"amount\\\":{\\n          \\\"currency\\\":\\\"EUR\\\",\\n          \\\"value\\\":2500\\n        },\\n        \\\"success\\\":\\\"false\\\",\\n        \\\"paymentMethod\\\":\\\"unknowncard\\\",\\n        \\\"additionalData\\\":{\\n          \\\"expiryDate\\\":\\\"03\\\/2030\\\",\\n          \\\"cardBin\\\":\\\"411111\\\",\\n          \\\"cardSummary\\\":\\\"1112\\\",\\n          \\\"checkoutSessionId\\\":\\\"861631540104159H\\\"\\n        },\\n        \\\"merchantReference\\\":\\\"YOUR_REFERENCE\\\",\\n        \\\"pspReference\\\":\\\"KHQC5N7G84BLNK43\\\",\\n        \\\"eventDate\\\":\\\"2021-09-13T14:14:05+02:00\\\"\\n      }\\n    }\\n  ]\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Next steps<\/h2>\n<div class=\"next-steps\" id=\"next-steps\" >\n<a href=\"\/standard\/integration\/drop-in\/tokenization\" class=\"next-steps__step\" style=\"width:29%;\" target=\"_self\"><div class=\"next-steps__title\">Tokenization<\/div><p class=\"next-steps__body\"><p>Store and reuse your shopper's payment details for faster checkout.<\/p><\/p><\/a><a href=\"\/standard\/integration\/drop-in\/best-practices\" class=\"next-steps__step\" style=\"width:29%;\" target=\"_self\"><div class=\"next-steps__title\">Best practices<\/div><p class=\"next-steps__body\"><p>Follow best practices to keep your integration secure, performant, and compliant.<\/p><\/p><\/a><a href=\"\/standard\/integration\/drop-in\/customize-checkout\" class=\"next-steps__step\" style=\"width:29%;\" target=\"_self\"><div class=\"next-steps__title\">Customize the checkout experience<\/div><p class=\"next-steps__body\"><p>Change the order of payment methods, localization settings, and styling.<\/p><\/p><\/a><a href=\"\/standard\/integration\/drop-in\/optional-drop-in-configuration\" class=\"next-steps__step\" style=\"width:29%;\" target=\"_self\"><div class=\"next-steps__title\">Drop-in optional configuration<\/div><p class=\"next-steps__body\"><p>Add optional configuration to customize the Drop-in UI and behavior.<\/p><\/p><\/a><a href=\"\/standard\/integration\/drop-in\/optional-server-configuration\" class=\"next-steps__step\" style=\"width:29%;\" target=\"_self\"><div class=\"next-steps__title\">Optional server configuration<\/div><p class=\"next-steps__body\"><p>Update the payment amount or get the payment session result on your server.<\/p><\/p><\/a><a href=\"\/standard\/integration\/drop-in\/donations\" class=\"next-steps__step\" style=\"width:29%;\" target=\"_self\"><div class=\"next-steps__title\">Donations<\/div><p class=\"next-steps__body\"><p>Accept donations with Adyen Giving after a successful payment.<\/p><\/p><\/a><\/div>\n","url":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in","articleFields":{"description":"Build your standard integration with Drop-in.","parameters":{"currency":"EUR","country_code":"NL","amount":"1000","shopper_locale":"nl-NL","channel":"Web"}},"algolia":{"url":"https:\/\/docs.adyen.com\/standard\/integration\/drop-in","title":"Drop-in","content":"Our pre-built Drop-in includes the UI and client-side logic to show available payment methods to your shopper, collect their payment information, and handle the complete payment flow.\nRequirements\nBefore you begin, take into account the following requirements, limitations, and preparations.\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nUse this information to build an online payments integration.\n\n\nCustomer Area roles\nMake sure that you have the following roles: Merchant admin role Manage API credentials\n\n\nAdyen API credentials\nMake sure that you have created the following: API credential API key Client key\n\n\nAdyen API credential roles\nMake sure that you have the roles for payments that are assigned by default.\n\n\nWebhooks\nSubscribe to the following webhooks: standard webhook with default event codes\n\n\nLimitations\nMake sure that your integration follows our recommended best practices: &lt;iframe&gt;: an &lt;iframe> must be hosted on the same domain as the parent window to support payment flows that use redirects.WebViews: we do not recommend using WebViews in native apps due to security and functionality limitations. Use native equivalents instead.Server-side Rendering (SSR): if you use SSR, ensure the AdyenCheckout instance and Drop-in are initialized on the client side.Browser support: we support recent versions of all major browsers. For 3D Secure 2: A strict Content Security Policy (CSP) can prevent native 3D Secure 2 challenges from being loaded on your website, because loading the 3D Secure 2 interface requires adding more URLs to your CSP. Adyen does not maintain a list of all URLs. You can specify to use the redirect flow when creating a session if you do not want to adjust your CSP.\n\n\nSetup steps\nMake sure that you have done the following: Set up your test account.Got an overview of what is required before you accept live payments.\n\n\n\nHow it works\nFor a Drop-in integration, you must implement the following parts:\n\nYour payment server: Sends the API request to create a payment session.\n\nUse the  \/sessions endpoint on Checkout API v72 or later.\nUse a server-side library released on March 30, 2026 or later.\n\nYour client website: Shows the Drop-in UI where the shopper makes the payment. Drop-in uses the data from the API responses to handle the payment flow and additional actions on your client website.\n\nUse Web Drop-in v6.30.0 or later.\n\nYour webhook server: Listens for webhook messages that include the outcome of each payment.\n\nPayment flow\nThe parts of your integration work together to complete the payment flow. The payment flow is the same for all payments:\n\nThe shopper goes to the checkout page.\nYour client website triggers a request to your payment server to create a payment session.\nYour server uses the shopper's country and currency information from your client to make a POST  \/sessions request to create a payment session. Adyen returns session data (session.id, session.sessionData).\nYour server passes the session data to your client website.\nYour client website creates an instance of AdyenCheckout using the session data, initializes Drop-in, and shows the payment UI to the shopper.\nThe shopper selects the payment method, enters payment details, and submits the payment.\nDrop-in handles the payment flow and sends payment data. Adyen returns the result of the payment session to Drop-in.\nYour client website shows the result of the payment session to the shopper.\nYour webhook server receives a webhook message with the payment outcome.\n\nCnNlcXVlbmNlRGlhZ3JhbQogICAgcGFydGljaXBhbnQgU2hvcHBlcgogICAgcGFydGljaXBhbnQgQ2xpZW50IGFzIFlvdXIgY2xpZW50IHdlYnNpdGUKICAgIHBhcnRpY2lwYW50IFNlcnZlciBhcyBZb3VyIHBheW1lbnQgc2VydmVyCiAgICBwYXJ0aWNpcGFudCBBZHllbgogICAgcGFydGljaXBhbnQgV2ViaG9vayBhcyBZb3VyIHdlYmhvb2sgc2VydmVyCgogICAgU2hvcHBlci0+PkNsaWVudDogMS4gR28gdG8gY2hlY2tvdXQgcGFnZQogICAgQ2xpZW50LT4+U2VydmVyOiAyLiBUcmlnZ2VyIHJlcXVlc3QgZm9yIHBheW1lbnQgc2Vzc2lvbgogICAgU2VydmVyLT4+QWR5ZW46IDMuIFJlcXVlc3QgdG8gY3JlYXRlIHBheW1lbnQgc2Vzc2lvbiAoUE9TVCAvc2Vzc2lvbnMpCiAgICBBZHllbi0tPj5TZXJ2ZXI6IFNlc3Npb24gZGF0YSAoc2Vzc2lvbi5pZCwgc2Vzc2lvbi5zZXNzaW9uRGF0YSkKICAgIFNlcnZlci0+PkNsaWVudDogNC4gUGFzcyBzZXNzaW9uIGRhdGEKICAgIENsaWVudC0+PkNsaWVudDogNS4gQ3JlYXRlIGluc3RhbmNlIG9mIGBBZHllbkNoZWNrb3V0YCBhbmQgaW5pdGlhbGl6ZSBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiBTaG93IHBheW1lbnQgVUkgdG8gc2hvcHBlcgogICAgU2hvcHBlci0+PkNsaWVudDogNi4gU3VibWl0IHRoZSBwYXltZW50CiAgICBDbGllbnQtPj5BZHllbjogNy4gRHJvcC1pbiBoYW5kbGVzIHRoZSBwYXltZW50IGZsb3cgYW5kIHNlbmRzIHBheW1lbnQgZGF0YQogICAgQWR5ZW4tLT4+Q2xpZW50OiBSZXN1bHQgb2YgdGhlIHBheW1lbnQgc2Vzc2lvbiB0byBEcm9wLWluCiAgICBDbGllbnQtPj5TaG9wcGVyOiA4LiBTaG93IHJlc3VsdCBvZiBwYXltZW50IHNlc3Npb24KICAgIEFkeWVuLT4+V2ViaG9vazogOS4gV2ViaG9vayBtZXNzYWdlIHdpdGggcGF5bWVudCBvdXRjb21lCg==\nImplementation overview\nThis guide is organized by each part of the integration that you must implement:\n\n\n  Payment server\n: Server-side setup and API calls.\n\n  Client website\n: Client-side setup, Drop-in configuration, and payment handling.\n\n  Webhook server\n: Receiving payment outcome notifications.\n\nPayment server\nThis section covers all the server-side implementation required for your Sessions flow integration. Complete these steps to set up your payment server.\n\nInstall an API library\nCreate a payment session\nHandle the payment result\n\nInstall an API library\nWe provide server-side API libraries for several programming languages, available through common package managers, like Gradle and npm, for easier installation and version management. Our API libraries will save you development time, because they:\n\nUse an API version that is up to date.\nHave generated models to help you construct requests.\nSend the request to Adyen using their built-in HTTP client, so you do not have to create your own.\n\n\n\n    \n        \n        \n    \n\n\nCreate a session\n\nA payment session is a resource with information about a payment flow initiated by the shopper. This resource has all the information required to handle all the stages of a payment flow. You can configure this resource with information like available payment methods, payment amount, or line items.\nTo create a payment session, make a  \/sessions request, including:\nRequest headers:\n\n\n\nHeader\nRequired\nDescription\n\n\n\n\nx-api-key\n\nYour Adyen API key for authentication.\n\n\nidempotency-key\n\nA unique identifier for the request. This is used to prevent duplicate requests from being processed.\n\n\ncontent-type\n\nThe content type of the request. Set to application\/json.\n\n\n\nRequest body:\n\n\n\nParameter name\nRequired\nDescription\n\n\n\n\nmerchantAccount\n\nYour merchant account name.\n\n\namount\n\nThe\u00a0currency\u00a0and\u00a0value\u00a0of the payment, in minor units. This is used to filter the list of available payment methods to your shopper.\n\n\nreturnUrl\n\nURL to where the shopper should be taken back to after a redirection.    If the URL to return to includes non-ASCII characters, like spaces or special letters, URL encode the value.   The URL must not include personally identifiable information (PII), for example name or email address. \n\n\nreference\n\nYour unique reference for the payment. Minimum length: three characters.\n\n\ncountryCode\n\nThe shopper's country code. This is used to filter the list of available payment methods to your shopper. If not set, setting the locale is required in the front-end global configuration.\n\n\nshopperEmail\n\nThe shopper's email address. Strongly recommended because this field is used in a number of risk checks, and for 3D Secure.\n\n\nshopperReference\n\nYour unique reference for the shopper. Do not include personally identifiable information (PII), such as name or email address.  Format: Minimum length: 3 characters.Case-sensitive. This field is used for the following: Risk checks.When storing the shopper's payment details: associating the token with the shopper.\n\n\nchannel\n\nThe platform where the payment is taking place. Use Web.\n\n\n\n\nFor a request that uses tokenization, you must include additional parameters.\n\n\n    \n\nThe response includes the following information that you need for the next steps.\n\n\n\nParameter\nDescription\n\n\n\n\nsessionData\nThe payment session data you need to pass to your front end.\n\n\nid\nA unique identifier for the session data.\n\n\n\n\n    \n\n\nNext step: Pass the id and sessionData values to your front end. You will use these values when creating the AdyenCheckout instance on your client website.\n\nHandling API errors\nIf your  \/sessions request does not get a HTTP 201 response, use the errorCode field and the list of API error codes to troubleshoot.\n\n    \n\nClient website\nThis section covers all the client-side implementation required for your Drop-in integration. Complete these steps to set up your client website.\n\nPrerequisite: Before starting this section, make sure you have completed the Payment server setup and have the id and sessionData values from the \/sessions response.\n\n\nInstall Adyen Web\nConfigure Drop-in\nHandle payment result\n\nInstall Adyen Web\nUse the Adyen Web npm package, or embed the Adyen Web script and stylesheet into your HTML file:\n\n\n    \n        \n        \n    \n\n\nCreate a container element\n\nCreate a Document Object Model (DOM) container element in your HTML where you want the Drop-in UI to appear. \n\n    \n\nCreate Drop-in\n\nDrop-in consists of the following:\n\nAdyenCheckout: represents one payment session.\nDropin: represents the interface that the shopper interacts with to make a payment.\n\nWith the AdyenCheckout instance, you can create a Dropin instance.\nCreate your instance of AdyenCheckout\nCreate a global configuration object that you use to create the instance of AdyenCheckout. The object contains global configuration parameters and event handlers.\n\n\nAdd configuration parameters.\n\n\n\nParameter name\nRequired\nDescription\n\n\n\n\nsession\n\nThe payment session object from the  \/sessions response. It includes session.id and session.sessionData.\n\n\nenvironment\n\nUse test. When you are ready to accept live payments, change the value to one of our live environments.\u00a0\n\n\namount\n\nAn object representing the amount to be displayed on the Pay Button. Its properties are value (the amount in the currencies smallest unit, for example cents for EUR) and currency.\n\n\ncountryCode\n\nThe shopper's country code. This is used to filter the list of available payment methods to your shopper.\n\n\nlocale\n\nThe language used in the Drop-in UI. For possible values, see the list of available languages.  By default, this is the either the shopperLocale from your \/sessions request or, if this locale is not available on Drop-in, en-US.\n\n\n\n\n\n\nAdd event handlers, to handle events that get triggered during the payment.\n\n\n\nEvent handler name\nRequired\nDescription\n\n\n\n\nonPaymentCompleted(result, component)\n\nCreate an event handler, called when the payment is completed.\n\n\nonPaymentFailed(result, component)\n\nCreate an event handler, called when the payment failed. A failed payment has result code Cancelled, Error or Refused.\n\n\nonError(error)\n\nCreate an event handler, called when an error occurs in Drop-in.\n\n\n\nCombine the configuration parameters and event handlers into your global configuration object.\n\n\n\n\n\n\nUse this global configuration object to create an instance of AdyenCheckout.\n\n\n\n\nInitializing in a reactive framework\nModern frameworks can re-render UI components, which can cause unexpected behavior in the checkout. As a rule, initialize AdyenCheckout and mount your Components only once when you are ready to display the payment methods.\n\n\n\nCreate your instance of Drop-in\n\n\n(Optional) Add configuration that is specific to Drop-in. This configuration is a different object than the global configuration. You pass this specific Drop-in configuration object when you create your instance of Dropin.\n\n\nCreate an instance of Drop-in, passing the following:\n\n\n\nArgument\nRequired\nDescription\n\n\n\n\nAdyenCheckout object\n\nThe instance of AdyenCheckout that you configured and created.\n\n\nDrop-in configuration object\n\nThe Drop-in configuration object that you created.\n\n\n\n\n\n\n\n\n\n\n\nMount the Drop-in to the DOM element that you created.\n\n\n\n\n    \n    \n        \n            \n            \n                                    Drop-in methods\n                            \n        \n        \n            \nYou can call the following methods from your instance of Drop-in:\n\n\n\nMethod name\nDescription\n\n\n\n\nmount(selector)\nMounts the Drop-in into the DOM returned by the selector.  The selector must be either a valid CSS selector string or an HTMLElement reference.\n\n\nunmount()\nUnmounts the Drop-in from the DOM. We recommend to unmount in case the payment amount changes after the initial mount.\n\n\ncloseActivePaymentMethod()\nCloses a selected payment method, for example if you want to reset the Drop-in.\n\n\nupdate()\nUpdates the properties and remounts Drop-in into the DOM, for example, if you want to change the properties of the configuration object after Drop-in is mounted.\n\n\n\n\n        \n    \n\n\n\n\nHandle the payment\nAfter you create and mount Drop-in, the shopper interacts with the interface to choose a payment method, enter their details in the payment form, and submit the payment.\nWhat you must handle depends on the payment:\n\nIf the payment does not require a redirect, Drop-in handles the complete payment flow. You can get the payment outcome.\nIf the payment requires a redirect, you must handle it.\n\nHandle the redirect\nSome payment methods or flows (for example: iDEAL and redirect 3D Secure 2 authentication) redirect the shopper to another website to complete the payment. \nWhen the shopper completes the payment on the other website, they get redirected back to your website (the returnUrl you specified when you created the payment session) with query parameters appended to it. \n\n    \n\n\nIf the shopper does not return to your website, you do not get the return URL with parameters appended to it. You do not need to handle the redirect. Instead, wait for the webhook message that we send to your server.\n\n\n\nExtract the following query parameters:\n\n\n\nQuery parameter\nDescription\n\n\n\n\nsessionId\nThe unique identifier for the shopper's payment session.\n\n\nredirectResult\nDetails you need to submit to handle the redirect.\n\n\n\n\n\nCreate a configuration object with the sessionId.\n\n\nCreate instance of AdyenCheckout, passing the configuration object that you created.\n\n\nCall submitDetails(details), passing the redirectResult value that you extracted from the return URL.\n\n\n\n\n\nGet the payment outcome.\n\n\nGet the payment outcome\nAfter Drop-in finishes the payment flow, you can inform the shopper about the current payment status. Adyen sends a webhook message with the outcome of the payment to your webhook server.\nInform the shopper\nDepending on whether the payment was successful, the onPaymentCompleted or onPaymentFailed event is triggered.\nFrom the relevant event, you can get the resultCode to inform the shopper about the current payment status.\nYou can optionally get the result of the payment session on your payment server.\nHandling Drop-in errors\nIf an error occurs, the onError event returns an object which contains details about the error:\n\n\n\nError field\nDescription\n\n\n\n\nerror.name\nThe type of error. Use the values it returns to configure localized error messages for your shoppers:  NETWORK_ERROR: a call that Drop-in made to the server has failed, for example because of a timeout, or if there is missing information in the request. Ask the shopper to try again. CANCEL: the shopper canceled the payment. Only applies for payment methods that allow explicit cancellation in the UI, for example Apple Pay or PayPal. IMPLEMENTATION_ERROR: the method or parameter is incorrect or not supported. ERROR: generic catch-all error. Tell the shopper something went wrong and ask them to try paying again, maybe with a different payment method. \n\n\nerror.message\nGives more information for each type of error. The message is technical so you shouldn't show it to your shoppers.  For error.name: NETWORK_ERROR, the information in the message field depends on the environment:  test: you get a message with a generic error code to help you troubleshoot. live: the message from the response. \n\n\ncomponent\nThe name of the variable where you created the instance of Drop-in, for example yourDropin.\n\n\n\nThe error object can contain additional fields inherited from the JavaScript Error() constructor.\nWebhook server\nThis section covers your webhook server. It includes information about the webhook messages that you receive about payment outcomes.\n\nPrerequisite: Make sure that you have set up webhook in your Customer Area and subscribed to the standard webhook with default event codes.\n\nUpdate your order management system\nUpdate your order management system when you get the outcome in a webhook message with eventCode: AUTHORISATION. Use the merchantReference from the webhook to match it to your order reference.\nThe merchantReference corresponds to the reference you provided when creating the payment session on your payment server.\nFor a successful payment, the event contains success: true.\n\n    \n\nFor an unsuccessful payment, you get success: false, and the reason field has details about why the payment was unsuccessful.\n\n    \n\nNext steps\n\nTokenizationStore and reuse your shopper's payment details for faster checkout.Best practicesFollow best practices to keep your integration secure, performant, and compliant.Customize the checkout experienceChange the order of payment methods, localization settings, and styling.Drop-in optional configurationAdd optional configuration to customize the Drop-in UI and behavior.Optional server configurationUpdate the payment amount or get the payment session result on your server.DonationsAccept donations with Adyen Giving after a successful payment.\n","type":"page","locale":"en","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Standard payments integration","lvl2":"Build your integration","lvl3":"Drop-in"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/standard","lvl2":"https:\/\/docs.adyen.com\/standard\/integration","lvl3":"\/standard\/integration\/drop-in"},"levels":4,"category":"","category_color":"","tags":["Drop-in"]},"articleFiles":{"custom-dropin-20201119.js":"<p alt=\"\">custom-dropin-20201119.js<\/p>","sessions-drop-in.svg":"<img alt=\"\" src=\"https:\/\/docs.adyen.com\/user\/pages\/docs\/standard\/integration\/drop-in\/sessions-drop-in.svg\" \/>"}}
