{"title":"Migrating to version 3.0.0","category":"default","creationDate":1795889611,"content":"<p>Use this guide to compare implementation differences if you are:<\/p>\n<ul>\n<li>Migrating from Web Components version 2.5.0 and earlier to Web Components version 3.0.0 or later.<\/li>\n<li>Switching your integration from Web Components version 2.5.0 and earlier to Web Drop-in.<\/li>\n<\/ul>\n<h2>API version<\/h2>\n<p>Drop-in requires v49 of the  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/paymentMethods\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/paymentMethods<\/a>,  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments<\/a>, and  <a href=\"https:\/\/docs.adyen.com\/api-explorer\/Checkout\/latest\/post\/payments\/details\" class=\"codeLabel  external-link no-image\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">\/payments\/details<\/a> endpoints. If you want to change your integration from <a href=\"\/online-payments\/components-web\">Web Components<\/a> to <a href=\"\/online-payments\/drop-in-web\">Web Drop-in<\/a>, you need to update your endpoint version to v49.<\/p>\n<p>If you are migrating from Web Components version 2.5.0 and earlier to Web Components version 3.0.0, we strongly recommend that you also update your endpoint version to v49.<\/p>\n<h2>New configuration property<\/h2>\n<p>We introduced the new <span translate=\"no\"><strong>environment<\/strong><\/span> property in version 3.0.0. This replaces the <span translate=\"no\"><strong>loadingContext<\/strong><\/span> config property used in versions 2.5.0 and earlier. Instead of specifying the domain, you only need to pass either <span translate=\"no\"><strong>test<\/strong><\/span> or <span translate=\"no\"><strong>live<\/strong><\/span> to set the environment.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Sample configuration for version 3.0.0 and later'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const checkout = new AdyenCheckout({\\n    ...\\n    environment: 'test' \\\/\\\/ This will use 'https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/'\\n});&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'Sample configuration for version 2.5.0 and earlier'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const checkout = new AdyenCheckout({\\n    ...\\n    loadingContext: 'https:\\\/\\\/checkoutshopper-test.adyen.com\\\/checkoutshopper\\\/'\\n});&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Change in state.data object<\/h2>\n<p>The <span translate=\"no\"><strong>state.data<\/strong><\/span> object returns the shopper's payment details information that you need to pass to your <code>\/payments<\/code> request.<\/p>\n<p>Starting from version 3.0.0, the <span translate=\"no\"><strong>state.data<\/strong><\/span> object returns the entire <span translate=\"no\"><strong>paymentMethod<\/strong><\/span> object that you will need to pass to the <code>\/payments<\/code> request. In previous versions, the <span translate=\"no\"><strong>state.data<\/strong><\/span> only includes properties that you pass in the <span translate=\"no\"><strong>paymentMethod<\/strong><\/span> object of your <code>\/payments<\/code> request.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'&lt;code&gt;state.data&lt;\/code&gt; for version 3.0.0 and later'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const ideal = checkout.create('ideal', {\\n    onChange = (state, component) =&gt; {\\n        state.data \\\/\\\/ { paymentMethod: { type: 'ideal', issuer: '1121' } }\\n    }\\n});&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'&lt;code&gt;state.data&lt;\/code&gt; for version 2.5.0 and earlier'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;js&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;const ideal = checkout.create('ideal', {\\n    onChange = (state, component) =&gt; {\\n        state.data \\\/\\\/ { type: 'ideal', issuer: '1121' }\\n    }\\n});&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<h2>Change in isValid method<\/h2>\n<p>The <span translate=\"no\"><strong>isValid<\/strong><\/span> method in version 3.0.0 is now a getter. In previous versions, the <span translate=\"no\"><strong>isValid<\/strong><\/span> is a function.<\/p>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'&lt;code&gt;isValid&lt;\/code&gt; for version 3.0.0 and later'\" :id=\"''\" :code-data='[{\"language\":\"js\",\"tabTitle\":\"\",\"content\":\"component.isValid \\\/\\\/ true\\\/false\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<div data-component-wrapper=\"code-sample\">\n    <code-sample :title=\"'&lt;code&gt;isValid&lt;\/code&gt;  for version 2.5.0 and earlier'\" :id=\"''\" :code-data='[{\"language\":\"js\",\"tabTitle\":\"\",\"content\":\"component.isValid() \\\/\\\/ true\\\/false\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>","url":"https:\/\/docs.adyen.com\/online-payments\/components-drop-in-release-notes\/migration-to-version3-guide","articleFields":{"description":"Learn about the changes when you upgrade to Web Drop-in or to Web Components version 3.0.0."},"algolia":{"url":"https:\/\/docs.adyen.com\/online-payments\/components-drop-in-release-notes\/migration-to-version3-guide","title":"Migrating to version 3.0.0","content":"Use this guide to compare implementation differences if you are:\n\nMigrating from Web Components version 2.5.0 and earlier to Web Components version 3.0.0 or later.\nSwitching your integration from Web Components version 2.5.0 and earlier to Web Drop-in.\n\nAPI version\nDrop-in requires v49 of the  \/paymentMethods,  \/payments, and  \/payments\/details endpoints. If you want to change your integration from Web Components to Web Drop-in, you need to update your endpoint version to v49.\nIf you are migrating from Web Components version 2.5.0 and earlier to Web Components version 3.0.0, we strongly recommend that you also update your endpoint version to v49.\nNew configuration property\nWe introduced the new environment property in version 3.0.0. This replaces the loadingContext config property used in versions 2.5.0 and earlier. Instead of specifying the domain, you only need to pass either test or live to set the environment.\n\n    \n\n\n    \n\nChange in state.data object\nThe state.data object returns the shopper's payment details information that you need to pass to your \/payments request.\nStarting from version 3.0.0, the state.data object returns the entire paymentMethod object that you will need to pass to the \/payments request. In previous versions, the state.data only includes properties that you pass in the paymentMethod object of your \/payments request.\n\n    \n\n\n    \n\nChange in isValid method\nThe isValid method in version 3.0.0 is now a getter. In previous versions, the isValid is a function.\n\n    \n\n\n    \n","type":"page","locale":"en","boost":17,"hierarchy":{"lvl0":"Home","lvl1":"Online payments","lvl2":"Web Drop-in and Components release notes","lvl3":"Migrating to version 3.0.0"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/online-payments","lvl2":"https:\/\/docs.adyen.com\/online-payments\/components-drop-in-release-notes","lvl3":"\/online-payments\/components-drop-in-release-notes\/migration-to-version3-guide"},"levels":4,"category":"Online Payments","category_color":"green","tags":["Migrating","version","3.0.0"]}}
