{"title":"Set up payment methods","category":"default","creationDate":1673532660,"content":"<p>This page guides you through setting up the payment methods you want to offer in your Composable Storefront. With our integration, most payment methods work out of the box, but some require additional configuration.<\/p>\n<h2>Requirements<\/h2>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Requirement<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><strong>Integration type<\/strong><\/td>\n<td style=\"text-align: left;\">A Salesforce <a href=\"\/plugins\/salesforce-commerce-cloud\/composable-storefront\/install-and-set-up-the-package\">Composable Storefront integration<\/a>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><strong>Setup steps<\/strong><\/td>\n<td style=\"text-align: left;\">Before you can set up payment methods in your Salesforce Business Manager, <a href=\"\/plugins\/salesforce-commerce-cloud\/supported-payment-methods\">add the payment methods that you want to offer<\/a> in your Customer Area.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2>Enable Adyen as your payment processor<\/h2>\n<p>To enable Adyen as the payment processor for cards and other local payment methods that you have added in your Customer Area:<\/p>\n<ol>\n<li>In the Salesforce Business Manager, go to <strong>Merchant tools<\/strong> &gt; <strong>Ordering<\/strong> &gt; <strong>Payment Methods<\/strong>.<\/li>\n<li>In the Payment Methods overview, check the <strong>ID<\/strong> column to make sure that <strong>AdyenComponent<\/strong> and <strong>CREDIT_CARD<\/strong> are enabled.<\/li>\n<li>Under Details, set <strong>Payment Processor<\/strong> to <strong>Adyen_Component<\/strong> for both types.<\/li>\n<\/ol>\n<p>After you enable Adyen as your payment processor, most payment methods from your Customer Area will be available in your Composable Storefront without requiring additional configuration. Payment methods that require additional setup steps are listed on this page.<\/p>\n<h2 id=\"apple-pay\">Apple Pay<\/h2>\n<p>You can allow your shoppers to check out with Apple Pay or Apple Pay express in your Composable Storefront integrated with Adyen. Our package supports setting up Apple Pay with Adyen's <a href=\"\/payment-methods\/apple-pay\/apple-pay-certificate\/\">Apple Pay certificate<\/a>. To set up Apple Pay:<\/p>\n<ol>\n<li><a href=\"#enable-apple-pay\">Enable Apple Pay<\/a>.<\/li>\n<li>Optionally, <a href=\"#express\">set up Apple Pay express<\/a>.<\/li>\n<li>Make <a href=\"#test\">test payments<\/a> with Apple Pay.<\/li>\n<li><a href=\"#go-live-apple-pay\">Go live<\/a>.<\/li>\n<\/ol>\n<h3 id=\"enable-apple-pay\">Enable Apple Pay<\/h3>\n<ol>\n<li><a href=\"https:\/\/developer.apple.com\/documentation\/apple_pay_on_the_web\/setting_up_your_server\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Set up your server<\/a> for secure communication with Apple Pay.\n<ul>\n<li>All pages that include Apple Pay must be served over HTTPS.<\/li>\n<li>Your domain must have a valid SSL certificate.<\/li>\n<\/ul><\/li>\n<li><a href=\"\/payment-methods\/add-payment-methods\">Add Apple Pay in your test Customer Area<\/a>.\n<ul>\n<li>You'll be asked for <strong>Shop websites<\/strong>: your website URLs, for example <code>https:\/\/www.mystore.com<\/code>. If you add more than one, separate them with a comma.<\/li>\n<li>You cannot use <code>http:\/\/localhost<\/code> to test.<\/li>\n<\/ul><\/li>\n<\/ol>\n<h3 id=\"express\">(Optional) Set up Apple Pay express<\/h3>\n<p>To allow your shoppers to pay with Apple Pay express, insert the Apple Pay express checkout button in a page of your PWA Retail React App. You can display the express checkout button on your cart page or the mini cart modal window.<\/p>\n<p>The integration only supports displaying the Apple Pay button after a shopper places one or more items in their basket. Therefore, it is not possible to display the Apple Pay express button on the product detail page.<\/p>\n\n<div id=\"tabfhqCw\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;v1.2.0&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;In your Retail React App, import the payment processing and UI elements that are required to enable the Apple Pay express checkout button on your cart page (&lt;code&gt;cart-cta.jsx&lt;\\\/code&gt;) or mini cart modal window (&lt;code&gt;use-add-to-cart-modal.js&lt;\\\/code&gt;).&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Import the elements&#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 &#039;@adyen\\\\\\\/adyen-salesforce-pwa\\\\\\\/dist\\\\\\\/app\\\\\\\/adyen.css&#039; \\\\\\\/\\\\\\\/ Import the Apple Pay button style.\\\\nimport {useAccessToken, useCustomerId, useCustomerType} from &#039;@salesforce\\\\\\\/commerce-sdk-react&#039; \\\\\\\/\\\\\\\/ Fetch the basket and use Salesforce Commerce APIs.\\\\nimport {AdyenExpressCheckoutProvider, ApplePayExpress} from &#039;@adyen\\\\\\\/adyen-salesforce-pwa&#039; \\\\\\\/\\\\\\\/ Import the Adyen Apple Pay Express component.\\\\nimport useMultiSite from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-multi-site&#039; \\\\\\\/\\\\\\\/ Import Salesforce React hooks to get the locale and site name for the shopper session.\\\\nimport PropTypes from &#039;prop-types&#039;&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Add the Adyen Express Checkout context in the Retail React App page where you want to enable Apple Pay express.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Add the context&#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;&amp;lt;AdyenExpressCheckoutProvider\\\\n   useAccessToken={useAccessToken}\\\\n   useCustomerId={useCustomerId}\\\\n   useCustomerType={useCustomerType}\\\\n   useMultiSite={useMultiSite}\\\\n&amp;gt;\\\\n   &amp;lt;ApplePayExpress \\\\\\\/&amp;gt;\\\\n&amp;lt;\\\\\\\/AdyenExpressCheckoutProvider&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;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;add-context&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;v2.0.0 and later&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;In your Retail React App, import the payment processing and UI elements that are required to enable the Apple Pay express checkout button on your cart page (&lt;code&gt;cart-cta.jsx&lt;\\\/code&gt;) or mini cart modal window (&lt;code&gt;use-add-to-cart-modal.js&lt;\\\/code&gt;).&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Import the elements&#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 &#039;@adyen\\\\\\\/adyen-salesforce-pwa\\\\\\\/dist\\\\\\\/app\\\\\\\/adyen.css&#039; \\\\\\\/\\\\\\\/ Import the Apple Pay button style.\\\\nimport {useAccessToken, useCustomerId, useCustomerType} from &#039;@salesforce\\\\\\\/commerce-sdk-react&#039; \\\\\\\/\\\\\\\/ Fetch the basket and use Salesforce Commerce APIs.\\\\nimport {AdyenExpressCheckoutProvider, ApplePayExpress} from &#039;@adyen\\\\\\\/adyen-salesforce-pwa&#039; \\\\\\\/\\\\\\\/ Import the Adyen Apple Pay Express component.\\\\nimport useMultiSite from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-multi-site&#039; \\\\\\\/\\\\\\\/ Import Salesforce React hooks to get the locale and site name for the shopper session.\\\\nimport PropTypes from &#039;prop-types&#039;&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Add the Adyen Express Checkout context in the Retail React App page where you want to enable Apple Pay express.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Add the context&#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;&amp;lt;AdyenExpressCheckoutProvider\\\\nauthToken={authToken}\\\\ncustomerId={customerId}\\\\nlocale={locale}\\\\nsite={site}\\\\nbasket={basket}\\\\nnavigate={navigate}\\\\n&amp;gt;\\\\n&amp;lt;ApplePayExpress \\\\\\\/&amp;gt;\\\\n&amp;lt;\\\\\\\/AdyenExpressCheckoutProvider&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;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;add-context-v2&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;v4.0.0 and later&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;In your Retail React App, import the payment processing and UI elements that are required to enable the Apple Pay express checkout button on your cart page (&lt;code&gt;cart-cta.jsx&lt;\\\/code&gt;) or mini cart modal window (&lt;code&gt;use-add-to-cart-modal.js&lt;\\\/code&gt;).&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Import the elements&#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 &#039;@adyen\\\\\\\/adyen-salesforce-pwa\\\\\\\/dist\\\\\\\/app\\\\\\\/adyen.css&#039; \\\\\\\/\\\\\\\/ Import the Apple Pay button style.\\\\nimport {useAccessToken, useCustomerId, useCustomerType} from &#039;@salesforce\\\\\\\/commerce-sdk-react&#039; \\\\\\\/\\\\\\\/ Fetch the basket and use Salesforce Commerce APIs.\\\\nimport {ApplePayExpress} from &#039;@adyen\\\\\\\/adyen-salesforce-pwa&#039; \\\\\\\/\\\\\\\/ Import the Adyen Apple Pay Express component.\\\\nimport useMultiSite from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-multi-site&#039; \\\\\\\/\\\\\\\/ Import Salesforce React hooks to get the locale and site name for the shopper session.\\\\nimport PropTypes from &#039;prop-types&#039;&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Add the Adyen PWA Apple Express Checkout component in the Retail React App page where you want to enable Apple Pay express.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Add the Apple Pay express checkout component&#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 React, {useEffect, useState} from &#039;react&#039;\\\\nimport {useAccessToken, useCustomerId} from &#039;@salesforce\\\\\\\/commerce-sdk-react&#039;\\\\nimport {useCurrentBasket} from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-current-basket&#039;\\\\nimport useMultiSite from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-multi-site&#039;\\\\nimport useNavigation from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-navigation&#039;\\\\nimport {ApplePayExpress} from &#039;@adyen\\\\\\\/adyen-salesforce-pwa&#039;\\\\nimport &#039;@adyen\\\\\\\/adyen-salesforce-pwa\\\\\\\/dist\\\\\\\/app\\\\\\\/adyen.css&#039;\\\\n\\\\nconst CartCTA = () =&amp;gt; {\\\\n    const {data: basket} = useCurrentBasket()\\\\n    const customerId = useCustomerId()\\\\n    const {getTokenWhenReady} = useAccessToken()\\\\n    const navigate = useNavigation()\\\\n    const {locale, site} = useMultiSite()\\\\n    const [authToken, setAuthToken] = useState()\\\\n    useEffect(() =&amp;gt; {\\\\n        const getToken = async () =&amp;gt; {\\\\n            const token = await getTokenWhenReady()\\\\n            setAuthToken(token)\\\\n        }\\\\n        getToken()\\\\n    }, [])\\\\n    const handleError = (error) =&amp;gt; {\\\\n        console.error(&#039;Apple Pay error:&#039;, error)\\\\n    }\\\\n    return (\\\\n        &amp;lt;div&amp;gt;\\\\n            {\\\\\\\/* Your existing cart CTA buttons *\\\\\\\/}\\\\n\\\\n            {\\\\\\\/* Apple Pay Express Button *\\\\\\\/}\\\\n            &amp;lt;ApplePayExpress\\\\n                authToken={authToken}\\\\n                site={site}\\\\n                locale={locale}\\\\n                basket={basket}\\\\n                navigate={navigate}\\\\n                customerId={customerId}\\\\n                onError={[handleError]}\\\\n            \\\\\\\/&amp;gt;\\\\n        &amp;lt;\\\\\\\/div&amp;gt;\\\\n    )\\\\n}\\\\n\\\\nexport default CartCTA&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;add-context-v4&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;v4.2.0 or later&quot;,&quot;content&quot;:&quot;\\n&lt;p&gt;On v4.2.0 and later of the package, you can also start the Apple Pay express flow on the product detail page.&lt;\\\/p&gt;\\n&lt;ol&gt;\\n&lt;li&gt;\\n&lt;p&gt;In your Retail React App, import the payment processing and UI elements that are required to enable the Apple Pay express checkout button on your cart page (&lt;code&gt;cart-cta.jsx&lt;\\\/code&gt;), mini cart modal window (&lt;code&gt;use-add-to-cart-modal.js&lt;\\\/code&gt;), or the product detail page.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Import the elements&#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 &#039;@adyen\\\\\\\/adyen-salesforce-pwa\\\\\\\/dist\\\\\\\/app\\\\\\\/adyen.css&#039; \\\\\\\/\\\\\\\/ Import the Apple Pay button style.\\\\nimport {useAccessToken, useCustomerId, useCustomerType} from &#039;@salesforce\\\\\\\/commerce-sdk-react&#039; \\\\\\\/\\\\\\\/ Fetch the basket and use Salesforce Commerce APIs.\\\\nimport {ApplePayExpress} from &#039;@adyen\\\\\\\/adyen-salesforce-pwa&#039; \\\\\\\/\\\\\\\/ Import the Adyen Apple Pay Express component.\\\\nimport useMultiSite from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-multi-site&#039; \\\\\\\/\\\\\\\/ Import Salesforce React hooks to get the locale and site name for the shopper session.\\\\nimport PropTypes from &#039;prop-types&#039;&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Add the Adyen PWA Apple Express Checkout component in the Retail React App page where you want to enable Apple Pay express.&lt;\\\/p&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Add the Apple Pay express checkout component&#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 React, {useEffect, useState} from &#039;react&#039;\\\\nimport {useAccessToken, useCustomerId} from &#039;@salesforce\\\\\\\/commerce-sdk-react&#039;\\\\nimport {useCurrentBasket} from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-current-basket&#039;\\\\nimport useMultiSite from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-multi-site&#039;\\\\nimport useNavigation from &#039;@salesforce\\\\\\\/retail-react-app\\\\\\\/app\\\\\\\/hooks\\\\\\\/use-navigation&#039;\\\\nimport {ApplePayExpress} from &#039;@adyen\\\\\\\/adyen-salesforce-pwa&#039;\\\\nimport &#039;@adyen\\\\\\\/adyen-salesforce-pwa\\\\\\\/dist\\\\\\\/app\\\\\\\/adyen.css&#039;\\\\n\\\\nconst CartCTA = () =&amp;gt; {\\\\n    const {data: basket} = useCurrentBasket()\\\\n    const customerId = useCustomerId()\\\\n    const {getTokenWhenReady} = useAccessToken()\\\\n    const navigate = useNavigation()\\\\n    const {locale, site} = useMultiSite()\\\\n    const [authToken, setAuthToken] = useState()\\\\n    useEffect(() =&amp;gt; {\\\\n        const getToken = async () =&amp;gt; {\\\\n            const token = await getTokenWhenReady()\\\\n            setAuthToken(token)\\\\n        }\\\\n        getToken()\\\\n    }, [])\\\\n    const handleError = (error) =&amp;gt; {\\\\n        console.error(&#039;Apple Pay error:&#039;, error)\\\\n    }\\\\n    return (\\\\n        &amp;lt;div&amp;gt;\\\\n            {\\\\\\\/* Your existing cart CTA buttons *\\\\\\\/}\\\\n\\\\n            {\\\\\\\/* Apple Pay Express Button *\\\\\\\/}\\\\n            &amp;lt;ApplePayExpress\\\\n                authToken={authToken}\\\\n                site={site}\\\\n                locale={locale}\\\\n                basket={basket}\\\\n                navigate={navigate}\\\\n                customerId={customerId}\\\\n                onError={[handleError]}\\\\n            \\\\\\\/&amp;gt;\\\\n        &amp;lt;\\\\\\\/div&amp;gt;\\\\n    )\\\\n}\\\\n\\\\nexport default CartCTA&amp;quot;}]\\&quot; :enable-copy-link-to-code-block=\\&quot;true\\&quot; :code-sample-card-size=\\&quot;&#039;fullsize&#039;\\&quot;&gt;&lt;\\\/code-sample&gt;\\n&lt;\\\/div&gt;\\n&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Only if you are displaying the Apple Pay express button on the product detail page, add the following to your Apple Pay express context.&lt;\\\/p&gt;\\n&lt;ul&gt;\\n&lt;li&gt;&lt;code&gt;isExpressPdp&lt;\\\/code&gt;= &lt;strong&gt;true&lt;\\\/strong&gt;&lt;\\\/li&gt;\\n&lt;li&gt;A &lt;code&gt;product&lt;\\\/code&gt; object that contains &lt;code&gt;id&lt;\\\/code&gt;, and &lt;code&gt;quantity&lt;\\\/code&gt;.&lt;\\\/li&gt;\\n&lt;\\\/ul&gt;\\n&lt;div data-component-wrapper=\\&quot;code-sample\\&quot;&gt;\\n&lt;code-sample :title=\\&quot;&#039;Display Apple Pay express on the product detail page&#039;\\&quot; :id=\\&quot;&#039;&#039;\\&quot; :code-data=\\&quot;[{&amp;quot;language&amp;quot;:&amp;quot;javascript&amp;quot;,&amp;quot;tabTitle&amp;quot;:&amp;quot;&amp;quot;,&amp;quot;content&amp;quot;:&amp;quot;&amp;lt;ApplePayExpress\\\\n   authToken={authToken}\\\\n   customerId={customerId}\\\\n   locale={locale}\\\\n   site={site}\\\\n   currency={currency}\\\\n   navigate={navigate}\\\\n   isExpressPdp={true}\\\\n   merchantDisplayName={&#039;Merchant name&#039;}\\\\n   product={ {id: product.id, quantity} }\\\\n   onError={[onError]}\\\\n \\\\\\\/&amp;gt;&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;div class=\\&quot;notices blue\\&quot;&gt;\\n&lt;p&gt;The component does not support handling quantity and variant changes on the product detail page.&lt;\\\/p&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='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<\/li>\n<\/ol>\n<h3 id=\"test\">Testing<\/h3>\n<p>Use Apple's test card numbers to test your integration. Refer to <a href=\"https:\/\/developer.apple.com\/apple-pay\/sandbox-testing\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Apple Documentation<\/a> for a full list of test cards and instructions on how to add those to your test device.<\/p>\n<p>You can check the status of an Apple Pay test payment in <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a> &gt; <strong>Transactions<\/strong> &gt; <strong>Payments<\/strong>.<\/p>\n<h3 id=\"go-live-apple-pay\">Go live<\/h3>\n<p>To process live Apple Pay payments, follow the steps that are relevant to your version.<\/p>\n\n<div id=\"tabopcYk\">\n    <div data-component-wrapper=\"tabs\">\n        <tabs\n                        :items=\"[{&quot;title&quot;:&quot;v1.2.0&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;Download and unzip the Apple Pay &lt;a href=\\&quot;\\\/payment-methods\\\/apple-pay\\\/web-component\\\/?tab=adyen-certificate-live_1\\&quot;&gt;domain association file from our Apple Pay documentation&lt;\\\/a&gt;. You do not have to follow the subsequent steps on the page.&lt;\\\/li&gt;\\n&lt;li&gt;In the &lt;a href=\\&quot;\\\/plugins\\\/salesforce-commerce-cloud\\\/composable-storefront\\\/install-and-set-up-the-package\\\/#set-environment-variables\\&quot;&gt;environment variables file you created when setting up the package&lt;\\\/a&gt;, add a &lt;strong&gt;YOUR_SITE_ID_ADYEN_APPLE_DOMAIN_ASSOCIATION&lt;\\\/strong&gt; variable.&lt;\\\/li&gt;\\n&lt;li&gt;\\n&lt;p&gt;Copy and paste the domain association file content to set the variable value:&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;text\\&quot;,\\&quot;tabTitle\\&quot;:\\&quot;\\&quot;,\\&quot;content\\&quot;:\\&quot;YOUR_SITE_ID_ADYEN_APPLE_DOMAIN_ASSOCIATION=\\\\\\&quot;7B227...\\\\\\&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&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;go-live-1&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;},{&quot;title&quot;:&quot;v2.0.0 and later&quot;,&quot;content&quot;:&quot;\\n&lt;ol&gt;\\n&lt;li&gt;Download and unzip the Apple Pay &lt;a href=\\&quot;\\\/payment-methods\\\/apple-pay\\\/web-component\\\/?tab=adyen-certificate-live_1\\&quot;&gt;domain association file from our Apple Pay documentation&lt;\\\/a&gt;. You do not have to follow the subsequent steps on the page.&lt;\\\/li&gt;\\n&lt;li&gt;In your MRT environment, &lt;a href=\\&quot;\\\/plugins\\\/salesforce-commerce-cloud\\\/composable-storefront\\\/install-and-set-up-the-package\\\/#set-environment-variables\\&quot;&gt;go to your environment variables&lt;\\\/a&gt;.&lt;\\\/li&gt;\\n&lt;li&gt;Copy the domain association file content, and paste it to the &lt;strong&gt;YOUR_SITE_ID_ADYEN_APPLE_DOMAIN_ASSOCIATION&lt;\\\/strong&gt; variable value.&lt;\\\/li&gt;\\n&lt;\\\/ol&gt;\\n&quot;,&quot;altTitle&quot;:&quot;go-live-2&quot;,&quot;oldTabId&quot;:1,&quot;relation&quot;:&quot;&quot;}]\"\n            :should-update-when-url-changes='true'>\n        <\/tabs>\n    <\/div>\n<\/div>\n\n<h2>Click to Pay<\/h2>\n<p><a href=\"\/payment-methods\/cards\/click-to-pay\">Click to Pay<\/a> is supported on v4.1.0 and later. To set up Click to Pay, you need to<\/p>\n<p>To set up Click to Pay:<\/p>\n<ol>\n<li>\n<p>To <a href=\"\/development-resources\/pci-dss-compliance-guide\/script-security#allow-external-sources\">allow scripts and iframes from external sources<\/a>, which is required to load Click to Pay, configure your <a href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/HTTP\/Guides\/CSP\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Content Security Policy (CSP)<\/a>:<\/p>\n<ol>\n<li>Go to the <code>overrides\/app\/ssr.js<\/code> file of your Retail React App, where you will add the required domains.<\/li>\n<li>Add the following Visa and Mastercard domains to the <strong>script-src<\/strong>, <strong>img-src<\/strong>, <strong>frame-src<\/strong>, and <strong>connect-src<\/strong> directives:\n<ul>\n<li><strong>*.mastercard.com<\/strong><\/li>\n<li><strong>*.visa.com<\/strong><\/li>\n<\/ul><\/li>\n<\/ol>\n<p>For an example, refer to <a href=\"https:\/\/github.com\/Adyen\/adyen-salesforce-headless-commerce-pwa\/blob\/develop\/packages\/adyen-retail-react-app\/overrides\/app\/ssr.js#L90\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">example implementation on GitHub<\/a>.<\/p>\n<\/li>\n<li>\n<p>Optionally, configure a Merchant Display name that will be shown on the Click to Pay dialog.<\/p>\n<ul>\n<li>In your <a href=\"\/plugins\/salesforce-commerce-cloud\/composable-storefront\/install-and-set-up-the-package?plugin=Salesforce%20Composable%20Storefront&amp;integration=package&amp;version=4.0.0#configure\"><code>AdyenCheckout<\/code> component instance<\/a>, set the <code>merchantDisplayName<\/code> to your preferred display name.<\/li>\n<\/ul>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Example AdyenCheckout configuration for Click to Pay'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;javascript&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;&lt;AdyenCheckout\\n   authToken={authToken}\\n   site={site}\\n   locale={locale}\\n   navigate={navigate}\\n   basket={basket}\\n\\n   returnUrl={${window.location.origin}\\\/checkout\\\/confirmation}\\n\\n   \\\/\\\/ Your other optional configuration\\n   merchantDisplayName={'YOUR_COMPANY_NAME'}\\n\\\/&gt;&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<h2 id=\"credit-card-installments\">Credit card installments<\/h2>\n<div class=\"notices blue\">\n<p>Credit card installments are optionally available in some countries. To learn more about their availability, see <a href=\"\/payment-methods\/cards\/credit-card-installments\">Credit card installments<\/a>.<\/p>\n<\/div>\n<p>Credit card installments are supported on v4.3.0 and later of the package. When enabled, the AdyenWeb card component shows the shopper an <strong>Installments<\/strong> dropdown next to the card form. The selected installment count is forwarded to Adyen, persisted on the Salesforce Commerce Cloud payment instrument as <code>c_cardInstallments<\/code>, and shown on the order confirmation page.<\/p>\n<div class=\"notices green\">\n<p>Installments only apply to regular card payments. Express checkouts (Apple Pay, Google Pay, and PayPal express) do not surface the installments UI.<\/p>\n<\/div>\n<h3>Requirements<\/h3>\n<ul>\n<li>In your <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">test Customer Area<\/a>, enable installments for each combination of merchant account, card scheme, and country that you want to support. Without this, the <code>\/payments<\/code> request fails with an installments-not-allowed error even if the storefront submits a valid value.<\/li>\n<li>\n<p>Installments are only allowed for the following country and currency combinations:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Country<\/th>\n<th style=\"text-align: left;\">Allowed values<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\">Brazil (BR)<\/td>\n<td style=\"text-align: left;\">Any unique integers in <code>1..99<\/code>. Currency must be <strong>BRL<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Mexico (MX)<\/td>\n<td style=\"text-align: left;\">Any unique subset of <code>[3, 6, 9, 12, 18]<\/code>. Currency must be <strong>MXN<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\">Japan (JP)<\/td>\n<td style=\"text-align: left;\">Plans <code>regular<\/code>, <code>revolving<\/code>, and <code>bonus<\/code>. <code>regular<\/code> accepts integers <code>2..99<\/code>; <code>revolving<\/code> and <code>bonus<\/code> always require <code>1<\/code>. Currency must be <strong>JPY<\/strong>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The PWA package enforces this country gate server-side based on the country part of the <code>locale<\/code> query parameter sent on <code>\/api\/adyen\/payments<\/code>. For any other country, the <code>installments<\/code> field is removed from the payment request before it reaches Adyen.<\/p>\n<\/li>\n<\/ul>\n<h3>Configure credit card installments<\/h3>\n<ol>\n<li>\n<p>To generate a ready-to-paste configuration block, run the helper script that ships with the package:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Generate the installments configuration'\" :id=\"''\" :code-data='[{\"language\":\"bash\",\"tabTitle\":\"\",\"content\":\"npx generate-installment-options\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<p>The script asks for the country, mode (single <code>card<\/code> or per-scheme), card schemes, and values or plans. It validates your input against the allowed values for each country and prints a configuration block that you can drop into your Retail React App.<\/p>\n<\/li>\n<li>\n<p>Pass the generated <code>card.installmentOptions<\/code> block to the <code>&lt;AdyenCheckout \/&gt;<\/code> component through the <code>paymentMethodsConfiguration<\/code> property in your checkout payment step (<code>overrides\/app\/pages\/checkout\/partials\/payment.jsx<\/code>).<\/p>\n<ul>\n<li>\n<p><strong>Per scheme<\/strong>: configure different installment values for each card brand, for example <strong>visa<\/strong>, <strong>mc<\/strong>, or <strong>amex<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Per-scheme installments configuration'\" :id=\"''\" :code-data='[{\"language\":\"javascript\",\"tabTitle\":\"\",\"content\":\"const paymentMethodsConfiguration = {\\n    card: {\\n        installmentOptions: {\\n            visa: {\\n                values: [2]\\n            },\\n            mc: {\\n                values: [4, 6]\\n            }\\n        },\\n        showInstallmentAmounts: true\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p><strong>Single configuration for all cards<\/strong>: a single <code>card<\/code> key applies to every accepted scheme.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Single installments configuration for all cards'\" :id=\"''\" :code-data='[{\"language\":\"javascript\",\"tabTitle\":\"\",\"content\":\"const paymentMethodsConfiguration = {\\n    card: {\\n        installmentOptions: {\\n            card: {values: [3, 6, 9, 12]}\\n        },\\n        showInstallmentAmounts: true\\n    }\\n}\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ul>\n<p>Set <code>showInstallmentAmounts<\/code> to <strong>true<\/strong> to display the per-installment amount, for example <code>3 x $33.33<\/code>, next to each option in the dropdown.<\/p>\n<\/li>\n<li>\n<p>Pass the <code>paymentMethodsConfiguration<\/code> object to your <code>&lt;AdyenCheckout \/&gt;<\/code> component instance:<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Pass installments configuration to AdyenCheckout'\" :id=\"''\" :code-data='[{\"language\":\"javascript\",\"tabTitle\":\"\",\"content\":\"&lt;AdyenCheckout\\n    authToken={authToken}\\n    site={site}\\n    locale={locale}\\n    navigate={navigate}\\n    basket={basket}\\n    paymentMethodsConfiguration={paymentMethodsConfiguration}\\n    \\\/\\\/ Your other configuration\\n\\\/&gt;\"}]' :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<\/ol>\n<p>After a successful payment, the selected installment count is stored on the order's payment instrument as <code>c_cardInstallments<\/code>. The retail app reads it from <code>order.paymentInstruments[0].c_cardInstallments<\/code> and renders an <strong>Installments<\/strong> line on the order confirmation page when the value is present.<\/p>\n<h2>PayPal express<\/h2>\n<p>PayPal express is supported on v4.2.0 and later of the package. With PayPal express, your shoppers can complete their purchases from the cart or product detail pages without manually entering shipping and billing information. The component handles the checkout flow by fetching the shipping addresses, and methods, so the shopper does not have to manually enter shipping and billing information.<\/p>\n<ol>\n<li>\n<p>Add the Adyen PWA PayPal express checkout component in your Retail React App page where you want to enable PayPal express.<\/p>\n<ul>\n<li>Cart page: <code>type<\/code>: <strong>cart<\/strong><\/li>\n<li>Product detail page: <code>type<\/code>: <strong>pdp<\/strong><\/li>\n<\/ul>\n<\/li>\n<li>\n<p>Only if you are displaying the component on the product detail page, add a <code>product<\/code> object in the PayPal express context. The product object must include the <code>id<\/code>, <code>price<\/code>, and <code>quantity<\/code> fields, so the component creates a temporary basket. The component uses <code>quantity * price<\/code> to calculate the price.<\/p>\n<div class=\"notices blue\">\n<p>The component does not support handling quantity and variant changes on the product detail page.<\/p>\n<\/div>\n<p>The example below shows how to add the PayPal express button on your product detail page with custom styling configuration and callbacks to handle the payment flow.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Add the PayPal express button to your product detail page'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;javascript&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;import {PayPalExpress} from '@adyen\\\/adyen-salesforce-pwa'\\n&lt;PayPalExpress\\n    authToken={authToken}\\n    customerId={customerId}\\n    locale={ {id: 'en-US'} }\\n    site={siteConfig}\\n    basket={basket}\\n    navigate={navigate}\\n    type=\\&quot;pdp\\&quot;\\n    currency=\\&quot;USD\\&quot;\\n    product={ { \\\/\\\/ Only required for the express flow on the product detail page\\n       id: 'product-123',\\n       price: 99.99,\\n       quantity: 1,\\n       variationAttributes: {...}\\n    } }\\n    beforeSubmit={[validateCart]}\\n    afterSubmit={[trackPaymentInitiation]}\\n    beforeAuthorized={[logAuthorization]}\\n    afterAuthorized={[updateAnalytics]}\\n    beforeShippingAddressChange={[validateAddress]}\\n    afterShippingAddressChange={[updateShippingCosts]}\\n    onError={[handleError, logError]}\\n    configuration={ {\\n        style: {\\n            layout: 'horizontal',\\n            shape: 'rect',\\n            label: 'paypal'\\n        }\\n    } }\\n    spinner={&lt;LoadingSpinner \\\/&gt;}\\n\\\/&gt;&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Optionally, redirect shoppers to a review page before they complete the payment where they can review their order by setting <code>enableReview<\/code> to <strong>{true}<\/strong>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Enable the review page'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;javascript&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;import {PayPalExpress} from '@adyen\\\/adyen-salesforce-pwa'\\n&lt;PayPalExpress\\n\\\/\\\/ Your other properties for the PayPal express flow\\nenableReview={true}\\nreviewPageUrl=\\&quot;\\\/checkout\\\/review\\&quot;\\n\\\/&gt;&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Configure your review page. The review page needs to:<\/p>\n<ul>\n<li>Display an order summary with the shipping and billing addresses.<\/li>\n<li>Show selected shipping and payment methods.<\/li>\n<li>Use the <code>useAdyenReviewPage<\/code> hook to retrieve payment data.<\/li>\n<li>Call <code>submitPaymentDetails()<\/code> when the shopper confirms the order details.<br \/>\nBelow is an example implementation of the review page.<\/li>\n<\/ul>\n<pre><code class=\"language-javascript\"> import {useAdyenReviewPage} from '@adyen\/adyen-salesforce-pwa'\n\n const ReviewPage = () =&gt; {\n const {data: basket} = useCurrentBasket()\n const customerId = useCustomerId()\n const {getTokenWhenReady} = useAccessToken()\n const {site} = useMultiSite()\n const navigate = useNavigation()\n const [authToken, setAuthToken] = useState()\n\n useEffect(() =&gt; {\n        const getToken = async () =&gt; {\n            const token = await getTokenWhenReady()\n            setAuthToken(token)\n        }\n        getToken()\n }, [])\n\n const {isLoading, isSubmitting, paymentData, error, submitPaymentDetails} = useAdyenReviewPage({\n        authToken,\n        customerId,\n        basketId: basket?.basketId,\n        site,\n        skip: !authToken || !basket?.basketId\n })\n\n const handlePlaceOrder = async () =&gt; {\n        if (!paymentData) return\n\n        try {\n            const response = await submitPaymentDetails()\n\n            if (response?.isSuccessful &amp;&amp; response?.isFinal) {\n                navigate(`\/checkout\/confirmation\/${response?.merchantReference}`)\n            } else {\n                \/\/ Handle payment failure\n            }\n        } catch (err) {\n            \/\/ Handle error\n        }\n }\n\n    return (\n        \/\/ Render order review UI\n        &lt;Button onClick={handlePlaceOrder} isLoading={isSubmitting}&gt;\n            Place Order\n        &lt;\/Button&gt;\n    )\n }<\/code><\/pre>\n<\/li>\n<\/ol>\n<h2 id=\"google-pay\">Google Pay<\/h2>\n<p><a href=\"\/payment-methods\/add-payment-methods\">Enable Google Pay<\/a> in your test <a href=\"https:\/\/ca-test.adyen.com\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Customer Area<\/a>. You do not need additional configuration for the standard Google Pay flow. Adyen automatically forwards the <code>merchantId<\/code> and <code>gatewayMerchantId<\/code> to the component.<\/p>\n<p>To enable Google Pay in the live environment, get your <a href=\"\/payment-methods\/google-pay\/web-drop-in#before-you-go-live\">Google Merchant ID<\/a> and register your storefront origins in your <a href=\"https:\/\/pay.google.com\/business\/console\/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\" class=\"external-link no-image\">Google Pay &amp; Wallet Console<\/a>.<\/p>\n<h3 id=\"google-pay-express\">Google Pay express<\/h3>\n<p>Google Pay express is supported on v4.3.0 and later of the package. With Google Pay express, your shoppers can complete their purchases from the cart or product detail pages without going through the regular multi-step checkout. The component opens the Google Pay sheet to collect the shipping address, shipping method, and payment method, and then authorizes the payment through Adyen.<\/p>\n<h4>Requirements<\/h4>\n<ul>\n<li>Configure shipping methods per market in Salesforce Commerce Cloud. If <code>\/api\/adyen\/shipping-methods<\/code> does not return any applicable methods for the selected address, the Google Pay sheet shows a <code>SHIPPING_ADDRESS_UNSERVICEABLE<\/code> error.<\/li>\n<li>Make sure the storefront uses locales whose country part matches a country supported by Google Pay. The component derives the country code from the last two characters of <code>locale.id<\/code>, for example <strong>en-US<\/strong> maps to <strong>US<\/strong>.<\/li>\n<\/ul>\n<h4>Add the Google Pay express component<\/h4>\n<ol>\n<li>\n<p>Add the Adyen PWA Google Pay express checkout component in your Retail React App page where you want to enable Google Pay express.<\/p>\n<ul>\n<li>Cart page: <code>cart-cta.jsx<\/code>. Pass the current <code>basket<\/code> to the component.<\/li>\n<li>Product detail page: set <code>isExpressPdp<\/code> to <strong>true<\/strong>. Pass a <code>product<\/code> object that contains <code>id<\/code>, <code>price<\/code>, <code>quantity<\/code>, and any required <code>variationAttributes<\/code>. Also pass the <code>currency<\/code>. The component creates a temporary basket through the Adyen package, so the shopper's main basket is not modified if they abandon the flow.<\/li>\n<\/ul>\n<div class=\"notices blue\">\n<p>The component does not support handling quantity and variant changes on the product detail page.<\/p>\n<\/div>\n<p>The example below shows how to add the Google Pay express button on your product detail page with custom styling configuration and callbacks to handle the payment flow.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Add the Google Pay express button to your product detail page'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;javascript&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;import {GooglePayExpress} from '@adyen\\\/adyen-salesforce-pwa'\\n&lt;GooglePayExpress\\n    authToken={authToken}\\n    customerId={customerId}\\n    locale={ {id: 'en-US'} }\\n    site={siteConfig}\\n    navigate={navigate}\\n    currency=\\&quot;USD\\&quot;\\n    isExpressPdp={true}\\n    merchantDisplayName={'Merchant name'}\\n    product={ { \\\/\\\/ Only required for the express flow on the product detail page\\n       id: 'product-123',\\n       price: 99.99,\\n       quantity: 1,\\n       variationAttributes: {...}\\n    } }\\n    onError={[handleError]}\\n    configuration={ {\\n        buttonColor: 'black',\\n        buttonType: 'pay',\\n        buttonRadius: 4\\n    } }\\n    spinner={&lt;LoadingSpinner \\\/&gt;}\\n\\\/&gt;&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>To add the Google Pay express button on your cart page, pass the current <code>basket<\/code> instead of <code>isExpressPdp<\/code>, <code>currency<\/code>, and <code>product<\/code>.<\/p>\n<div data-component-wrapper=\"code-sample\">\n<code-sample :title=\"'Add the Google Pay express button to your cart page'\" :id=\"''\" :code-data=\"[{&quot;language&quot;:&quot;javascript&quot;,&quot;tabTitle&quot;:&quot;&quot;,&quot;content&quot;:&quot;import {GooglePayExpress} from '@adyen\\\/adyen-salesforce-pwa'\\n&lt;GooglePayExpress\\n    locale={locale}\\n    site={site}\\n    basket={basket}\\n    navigate={navigate}\\n    onError={[showError]}\\n    spinner={&lt;LoadingSpinner \\\/&gt;}\\n\\\/&gt;&quot;}]\" :enable-copy-link-to-code-block=\"true\" :code-sample-card-size=\"'fullsize'\"><\/code-sample>\n<\/div>\n<\/li>\n<li>\n<p>Use the following properties to configure the component:<\/p>\n<table>\n<thead>\n<tr>\n<th style=\"text-align: left;\">Property<\/th>\n<th style=\"text-align: left;\">Type<\/th>\n<th style=\"text-align: center;\">Required<\/th>\n<th style=\"text-align: left;\">Description<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"text-align: left;\"><code>locale<\/code><\/td>\n<td style=\"text-align: left;\">Object<\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The locale object. The <code>locale.id<\/code> is forwarded to AdyenWeb and used to derive the Google Pay <code>countryCode<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>site<\/code><\/td>\n<td style=\"text-align: left;\">Object<\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The current site object.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>basket<\/code><\/td>\n<td style=\"text-align: left;\">Object<\/td>\n<td style=\"text-align: center;\">Cart only<\/td>\n<td style=\"text-align: left;\">The current basket. Required in cart mode and ignored when <code>isExpressPdp<\/code> is <strong>true<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>navigate<\/code><\/td>\n<td style=\"text-align: left;\">Function<\/td>\n<td style=\"text-align: center;\"><img title=\"-white_check_mark-\" alt=\"-white_check_mark-\" class=\"smileys\" src=\"\/user\/data\/smileys\/emoji\/white_check_mark.png\" \/><\/td>\n<td style=\"text-align: left;\">The React Router navigate function used to redirect to the order confirmation page.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>isExpressPdp<\/code><\/td>\n<td style=\"text-align: left;\">Boolean<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Set to <strong>true<\/strong> to start the express flow on the product detail page. The component creates a temporary basket on click.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>currency<\/code><\/td>\n<td style=\"text-align: left;\">String<\/td>\n<td style=\"text-align: center;\">PDP only<\/td>\n<td style=\"text-align: left;\">The currency to use for the synthetic basket built from the product. Required when <code>isExpressPdp<\/code> is <strong>true<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>product<\/code><\/td>\n<td style=\"text-align: left;\">Object<\/td>\n<td style=\"text-align: center;\">PDP only<\/td>\n<td style=\"text-align: left;\">The product object with <code>id<\/code>, <code>price<\/code>, <code>quantity<\/code>, and any required <code>variationAttributes<\/code>. Required when <code>isExpressPdp<\/code> is <strong>true<\/strong>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>merchantDisplayName<\/code><\/td>\n<td style=\"text-align: left;\">String<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Display name shown in the Google Pay sheet.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>configuration<\/code><\/td>\n<td style=\"text-align: left;\">Object<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Display overrides for the Google Pay button, for example <code>buttonColor<\/code>, <code>buttonType<\/code>, and <code>buttonRadius<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>onError<\/code><\/td>\n<td style=\"text-align: left;\">Array of functions<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Callbacks invoked with errors from the environment, payment methods, shipping, or payment flow.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>spinner<\/code><\/td>\n<td style=\"text-align: left;\">Node<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">Custom loader rendered while the environment, payment methods, or shipping methods are loading.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>authToken<\/code><\/td>\n<td style=\"text-align: left;\">String<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">A pre-fetched SCAPI access token. If not provided, the component fetches one with <code>useAccessToken<\/code>.<\/td>\n<\/tr>\n<tr>\n<td style=\"text-align: left;\"><code>customerId<\/code><\/td>\n<td style=\"text-align: left;\">String<\/td>\n<td style=\"text-align: center;\"><\/td>\n<td style=\"text-align: left;\">A pre-fetched customer ID. If not provided, the component fetches one with <code>useCustomerId<\/code>.<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>The component is silently not mounted on browsers or devices that do not support Google Pay.<\/p>\n<\/li>\n<\/ol>\n<h2>See also<\/h2>\n<ul>\n<li><a href=\"\/payment-methods\/express-checkout\">Express payment methods<\/a><\/li>\n<\/ul>","url":"https:\/\/docs.adyen.com\/plugins\/salesforce-commerce-cloud\/composable-storefront\/set-up-payment-methods","articleFields":{"description":"Configure the payment methods that you want to offer in your Composable Storefront.","next_steps":[{"title":"Customization guide","description":"Check our customization guide to learn how you can modify your integration.","url":"\/plugins\/salesforce-commerce-cloud\/composable-storefront\/customization-guide","required":false},{"title":"Configure your live account","description":"Follow this checklist before you start accepting live payments.","url":"\/plugins\/salesforce-commerce-cloud\/composable-storefront\/go-live-checklist","required":true}],"id":"42850199","type":"page","_expandable":{"operations":""},"status":"current","last_edit_on":"01-05-2024 11:14","feedback_component":true,"filters_component":false,"dynamic_minitoc":false,"page_id":"365ca7a8-77d9-4cb6-a6aa-eb31e266cc0e","decision_tree":"[]"},"algolia":{"url":"https:\/\/docs.adyen.com\/plugins\/salesforce-commerce-cloud\/composable-storefront\/set-up-payment-methods","title":"Set up payment methods","content":"This page guides you through setting up the payment methods you want to offer in your Composable Storefront. With our integration, most payment methods work out of the box, but some require additional configuration.\nRequirements\n\n\n\nRequirement\nDescription\n\n\n\n\nIntegration type\nA Salesforce Composable Storefront integration.\n\n\nSetup steps\nBefore you can set up payment methods in your Salesforce Business Manager, add the payment methods that you want to offer in your Customer Area.\n\n\n\nEnable Adyen as your payment processor\nTo enable Adyen as the payment processor for cards and other local payment methods that you have added in your Customer Area:\n\nIn the Salesforce Business Manager, go to Merchant tools &gt; Ordering &gt; Payment Methods.\nIn the Payment Methods overview, check the ID column to make sure that AdyenComponent and CREDIT_CARD are enabled.\nUnder Details, set Payment Processor to Adyen_Component for both types.\n\nAfter you enable Adyen as your payment processor, most payment methods from your Customer Area will be available in your Composable Storefront without requiring additional configuration. Payment methods that require additional setup steps are listed on this page.\nApple Pay\nYou can allow your shoppers to check out with Apple Pay or Apple Pay express in your Composable Storefront integrated with Adyen. Our package supports setting up Apple Pay with Adyen's Apple Pay certificate. To set up Apple Pay:\n\nEnable Apple Pay.\nOptionally, set up Apple Pay express.\nMake test payments with Apple Pay.\nGo live.\n\nEnable Apple Pay\n\nSet up your server for secure communication with Apple Pay.\n\nAll pages that include Apple Pay must be served over HTTPS.\nYour domain must have a valid SSL certificate.\n\nAdd Apple Pay in your test Customer Area.\n\nYou'll be asked for Shop websites: your website URLs, for example https:\/\/www.mystore.com. If you add more than one, separate them with a comma.\nYou cannot use http:\/\/localhost to test.\n\n\n(Optional) Set up Apple Pay express\nTo allow your shoppers to pay with Apple Pay express, insert the Apple Pay express checkout button in a page of your PWA Retail React App. You can display the express checkout button on your cart page or the mini cart modal window.\nThe integration only supports displaying the Apple Pay button after a shopper places one or more items in their basket. Therefore, it is not possible to display the Apple Pay express button on the product detail page.\n\n\n    \n        \n        \n    \n\n\n\n\nTesting\nUse Apple's test card numbers to test your integration. Refer to Apple Documentation for a full list of test cards and instructions on how to add those to your test device.\nYou can check the status of an Apple Pay test payment in Customer Area &gt; Transactions &gt; Payments.\nGo live\nTo process live Apple Pay payments, follow the steps that are relevant to your version.\n\n\n    \n        \n        \n    \n\n\nClick to Pay\nClick to Pay is supported on v4.1.0 and later. To set up Click to Pay, you need to\nTo set up Click to Pay:\n\n\nTo allow scripts and iframes from external sources, which is required to load Click to Pay, configure your Content Security Policy (CSP):\n\nGo to the overrides\/app\/ssr.js file of your Retail React App, where you will add the required domains.\nAdd the following Visa and Mastercard domains to the script-src, img-src, frame-src, and connect-src directives:\n\n*.mastercard.com\n*.visa.com\n\n\nFor an example, refer to example implementation on GitHub.\n\n\nOptionally, configure a Merchant Display name that will be shown on the Click to Pay dialog.\n\nIn your AdyenCheckout component instance, set the merchantDisplayName to your preferred display name.\n\n\n\n\n\n\nCredit card installments\n\nCredit card installments are optionally available in some countries. To learn more about their availability, see Credit card installments.\n\nCredit card installments are supported on v4.3.0 and later of the package. When enabled, the AdyenWeb card component shows the shopper an Installments dropdown next to the card form. The selected installment count is forwarded to Adyen, persisted on the Salesforce Commerce Cloud payment instrument as c_cardInstallments, and shown on the order confirmation page.\n\nInstallments only apply to regular card payments. Express checkouts (Apple Pay, Google Pay, and PayPal express) do not surface the installments UI.\n\nRequirements\n\nIn your test Customer Area, enable installments for each combination of merchant account, card scheme, and country that you want to support. Without this, the \/payments request fails with an installments-not-allowed error even if the storefront submits a valid value.\n\nInstallments are only allowed for the following country and currency combinations:\n\n\n\nCountry\nAllowed values\n\n\n\n\nBrazil (BR)\nAny unique integers in 1..99. Currency must be BRL.\n\n\nMexico (MX)\nAny unique subset of [3, 6, 9, 12, 18]. Currency must be MXN.\n\n\nJapan (JP)\nPlans regular, revolving, and bonus. regular accepts integers 2..99; revolving and bonus always require 1. Currency must be JPY.\n\n\n\nThe PWA package enforces this country gate server-side based on the country part of the locale query parameter sent on \/api\/adyen\/payments. For any other country, the installments field is removed from the payment request before it reaches Adyen.\n\n\nConfigure credit card installments\n\n\nTo generate a ready-to-paste configuration block, run the helper script that ships with the package:\n\n\n\nThe script asks for the country, mode (single card or per-scheme), card schemes, and values or plans. It validates your input against the allowed values for each country and prints a configuration block that you can drop into your Retail React App.\n\n\nPass the generated card.installmentOptions block to the &lt;AdyenCheckout \/&gt; component through the paymentMethodsConfiguration property in your checkout payment step (overrides\/app\/pages\/checkout\/partials\/payment.jsx).\n\n\nPer scheme: configure different installment values for each card brand, for example visa, mc, or amex.\n\n\n\n\n\nSingle configuration for all cards: a single card key applies to every accepted scheme.\n\n\n\n\n\nSet showInstallmentAmounts to true to display the per-installment amount, for example 3 x $33.33, next to each option in the dropdown.\n\n\nPass the paymentMethodsConfiguration object to your &lt;AdyenCheckout \/&gt; component instance:\n\n\n\n\n\nAfter a successful payment, the selected installment count is stored on the order's payment instrument as c_cardInstallments. The retail app reads it from order.paymentInstruments[0].c_cardInstallments and renders an Installments line on the order confirmation page when the value is present.\nPayPal express\nPayPal express is supported on v4.2.0 and later of the package. With PayPal express, your shoppers can complete their purchases from the cart or product detail pages without manually entering shipping and billing information. The component handles the checkout flow by fetching the shipping addresses, and methods, so the shopper does not have to manually enter shipping and billing information.\n\n\nAdd the Adyen PWA PayPal express checkout component in your Retail React App page where you want to enable PayPal express.\n\nCart page: type: cart\nProduct detail page: type: pdp\n\n\n\nOnly if you are displaying the component on the product detail page, add a product object in the PayPal express context. The product object must include the id, price, and quantity fields, so the component creates a temporary basket. The component uses quantity * price to calculate the price.\n\nThe component does not support handling quantity and variant changes on the product detail page.\n\nThe example below shows how to add the PayPal express button on your product detail page with custom styling configuration and callbacks to handle the payment flow.\n\n\n\n\n\nOptionally, redirect shoppers to a review page before they complete the payment where they can review their order by setting enableReview to {true}.\n\n\n\n\n\nConfigure your review page. The review page needs to:\n\nDisplay an order summary with the shipping and billing addresses.\nShow selected shipping and payment methods.\nUse the useAdyenReviewPage hook to retrieve payment data.\nCall submitPaymentDetails() when the shopper confirms the order details.\nBelow is an example implementation of the review page.\n\n import {useAdyenReviewPage} from '@adyen\/adyen-salesforce-pwa'\n\n const ReviewPage = () =&gt; {\n const {data: basket} = useCurrentBasket()\n const customerId = useCustomerId()\n const {getTokenWhenReady} = useAccessToken()\n const {site} = useMultiSite()\n const navigate = useNavigation()\n const [authToken, setAuthToken] = useState()\n\n useEffect(() =&gt; {\n        const getToken = async () =&gt; {\n            const token = await getTokenWhenReady()\n            setAuthToken(token)\n        }\n        getToken()\n }, [])\n\n const {isLoading, isSubmitting, paymentData, error, submitPaymentDetails} = useAdyenReviewPage({\n        authToken,\n        customerId,\n        basketId: basket?.basketId,\n        site,\n        skip: !authToken || !basket?.basketId\n })\n\n const handlePlaceOrder = async () =&gt; {\n        if (!paymentData) return\n\n        try {\n            const response = await submitPaymentDetails()\n\n            if (response?.isSuccessful &amp;&amp; response?.isFinal) {\n                navigate(`\/checkout\/confirmation\/${response?.merchantReference}`)\n            } else {\n                \/\/ Handle payment failure\n            }\n        } catch (err) {\n            \/\/ Handle error\n        }\n }\n\n    return (\n        \/\/ Render order review UI\n        &lt;Button onClick={handlePlaceOrder} isLoading={isSubmitting}&gt;\n            Place Order\n        &lt;\/Button&gt;\n    )\n }\n\n\nGoogle Pay\nEnable Google Pay in your test Customer Area. You do not need additional configuration for the standard Google Pay flow. Adyen automatically forwards the merchantId and gatewayMerchantId to the component.\nTo enable Google Pay in the live environment, get your Google Merchant ID and register your storefront origins in your Google Pay &amp; Wallet Console.\nGoogle Pay express\nGoogle Pay express is supported on v4.3.0 and later of the package. With Google Pay express, your shoppers can complete their purchases from the cart or product detail pages without going through the regular multi-step checkout. The component opens the Google Pay sheet to collect the shipping address, shipping method, and payment method, and then authorizes the payment through Adyen.\nRequirements\n\nConfigure shipping methods per market in Salesforce Commerce Cloud. If \/api\/adyen\/shipping-methods does not return any applicable methods for the selected address, the Google Pay sheet shows a SHIPPING_ADDRESS_UNSERVICEABLE error.\nMake sure the storefront uses locales whose country part matches a country supported by Google Pay. The component derives the country code from the last two characters of locale.id, for example en-US maps to US.\n\nAdd the Google Pay express component\n\n\nAdd the Adyen PWA Google Pay express checkout component in your Retail React App page where you want to enable Google Pay express.\n\nCart page: cart-cta.jsx. Pass the current basket to the component.\nProduct detail page: set isExpressPdp to true. Pass a product object that contains id, price, quantity, and any required variationAttributes. Also pass the currency. The component creates a temporary basket through the Adyen package, so the shopper's main basket is not modified if they abandon the flow.\n\n\nThe component does not support handling quantity and variant changes on the product detail page.\n\nThe example below shows how to add the Google Pay express button on your product detail page with custom styling configuration and callbacks to handle the payment flow.\n\n\n\n\n\nTo add the Google Pay express button on your cart page, pass the current basket instead of isExpressPdp, currency, and product.\n\n\n\n\n\nUse the following properties to configure the component:\n\n\n\nProperty\nType\nRequired\nDescription\n\n\n\n\nlocale\nObject\n\nThe locale object. The locale.id is forwarded to AdyenWeb and used to derive the Google Pay countryCode.\n\n\nsite\nObject\n\nThe current site object.\n\n\nbasket\nObject\nCart only\nThe current basket. Required in cart mode and ignored when isExpressPdp is true.\n\n\nnavigate\nFunction\n\nThe React Router navigate function used to redirect to the order confirmation page.\n\n\nisExpressPdp\nBoolean\n\nSet to true to start the express flow on the product detail page. The component creates a temporary basket on click.\n\n\ncurrency\nString\nPDP only\nThe currency to use for the synthetic basket built from the product. Required when isExpressPdp is true.\n\n\nproduct\nObject\nPDP only\nThe product object with id, price, quantity, and any required variationAttributes. Required when isExpressPdp is true.\n\n\nmerchantDisplayName\nString\n\nDisplay name shown in the Google Pay sheet.\n\n\nconfiguration\nObject\n\nDisplay overrides for the Google Pay button, for example buttonColor, buttonType, and buttonRadius.\n\n\nonError\nArray of functions\n\nCallbacks invoked with errors from the environment, payment methods, shipping, or payment flow.\n\n\nspinner\nNode\n\nCustom loader rendered while the environment, payment methods, or shipping methods are loading.\n\n\nauthToken\nString\n\nA pre-fetched SCAPI access token. If not provided, the component fetches one with useAccessToken.\n\n\ncustomerId\nString\n\nA pre-fetched customer ID. If not provided, the component fetches one with useCustomerId.\n\n\n\nThe component is silently not mounted on browsers or devices that do not support Google Pay.\n\n\nSee also\n\nExpress payment methods\n","type":"page","locale":"en","boost":16,"hierarchy":{"lvl0":"Home","lvl1":"Plugins","lvl2":"Salesforce Commerce Cloud - B2C Commerce","lvl3":"Composable Storefront package","lvl4":"Set up payment methods"},"hierarchy_url":{"lvl0":"https:\/\/docs.adyen.com\/","lvl1":"https:\/\/docs.adyen.com\/plugins","lvl2":"https:\/\/docs.adyen.com\/plugins\/salesforce-commerce-cloud","lvl3":"https:\/\/docs.adyen.com\/plugins\/salesforce-commerce-cloud\/composable-storefront","lvl4":"\/plugins\/salesforce-commerce-cloud\/composable-storefront\/set-up-payment-methods"},"levels":5,"category":"Plugins","category_color":"green","tags":["payment","methods"]}}
