For older versions of the Adyen Payments Cartridge, see our older documentation. You can also learn more about how to migrate to Adyen Payments Cartridge version 20.1.0.
Before you begin
Before you begin, make sure that you have performed the following steps:
- Create a test account with Adyen. With this, you will be able to access the test Customer Area, and apply for a live account. While you wait for your live account credentials, you can start integrating by using your test account.
- Finish the metadata import.
-
In Salesforce Commerce Cloud, enforce HTTPS.
To be compatible with the Chrome v80 Cookie policy, you need to enforce the use of HTTPS for all sites.
Step 1: Set up the cartridge path
-
Go to Administration > Sites > Manage Sites > [yourSite] > Settings.
-
In the Cartridges field:
- If you are using SFRA, enter:
int_adyen_SFRA:int_adyen_overlay:app_storefront_base - If you are using a controller-based SiteGenesis, enter:
int_adyen_controllers:int_adyen_overlay:app_storefront_controllers:app_storefront_core - If you are using any form of customizations, make sure to follow our customization guide on best practices around customizations.
- If you are using SFRA, enter:
-
Select Apply.
Step 2: Enable the Business Manager configuration page
To show the Adyen settings menu item in your Business Manager:
- Go to Administration > Sites > Manage Sites > Business Manager - Settings.
- In the cartridges field, enter int_adyen_overlay:app_storefront_base. Select Apply.
- Go to Administration > Organization > Roles & Permissions > Administrator - Business Manager Modules.
- In the dialogue box, select the site you want to enable Adyen for or select the Sites box to select all. Select Apply.
- Under Custom Preferences, find Adyen settings in the list and select the checkbox in the right column. At the bottom of the page, select Update.
Step 3: Generate an API key and client key
In your Adyen Customer Area, generate an API key that connects your Commerce Cloud store to the Adyen API. To authenticate requests from your payment environment, the cartridge also needs a client key.
Generate an API key in your Adyen Customer Area
- Log in to your Customer Area.
- Go to Developers > API credentials, and select the API credential username for your integration, for example ws@Company.[YourCompanyAccount].
- Under Server settings > Authentication select the API key tab.
- Select Generate API key.
- Select the copy icon and store your API key securely in your system.
- Select Save changes.
Generate a client key in your Adyen Customer Area
- Log in to your Customer Area.
- Go to Developers > API credentials, and select the credential username for your integration, for example ws@Company.[YourCompanyAccount].
- Under Client settings > Authentication select the Client key tab.
- Select Generate client key.
- Select the copy icon and store your client key securely in your system.
- Under Add allowed origins, enter your domains and select Add.
- Select Save changes.
After generating both keys, add them to your Business Manager when configuring settings.
Step 4: Set up webhooks
You get webhooks with payment status changes for transactions from your Commerce Cloud store. Set them up in your Adyen Customer area:
- Log in to your Customer Area. Switch to your merchant account.
- Select Developers > Webhooks.
- Select + Webhook.
- Under Recommended webhooks > Standard webhook select Add.
- Select the toggle to make the standard webhook Enabled.
- Select the edit icon for Server configuration.
- Enter:
- URL: Your webhook server's URL, adding
/Adyen-Notify
at the end. - Method: Select HTTP POST.
- Encryption Protocol: Select TLSv1.2.
- URL: Your webhook server's URL, adding
- Select Apply.
- Under Security > Basic authentication, select the edit icon . Enter your server's username and password. Select Apply.
- Select Save changes.
Test webhooks
To test your webhooks:
Your server must acknowledge webhooks with a response message.
- Log in to your Customer Area.
- Select Developers > Webhooks.
- Select the edit icon for the webhook to test. You can test only the event codes you configured for this webhook.
- Select Test configuration.
- If you're on a company account, select a Merchant account from the dropdown list.
- In the Event dropdown list, select the event code to test webhooks for.
If the test webhook failed, you get an error message with the reason. Troubleshoot the problem.
Configure scheduled jobs
Webhooks are stored in Commerce Cloud as custom object instances to be processed by scheduled jobs.
After the metadata import, a scheduled job with ID Process is added to the Business Manager: Administration > Operations > Jobs. This scheduled job has two steps (you can check this in the Job Steps tab):
- Process – Processes the webhook and updates the payment status of the order.
- Clean – Deletes the custom object instance, once it has been processed.
We recommend that you set the frequency of this scheduled job to 1 minute:
- Go to the Schedule and History tab for the Process scheduled job.
- Set Trigger to Recurring Interval.
- In the Run Time pane, set Amount to 1, and Interval to Minutes.
Step 5: Configure Business Manager settings
To configure your Business Manager settings:
- Go to Site Preferences > Custom Preferences > Adyen.
- Follow the instructions on the page to configure the required settings sections:
- Account settings: use the credentials you generated in the previous step.
- Webhook settings
- Local payment method settings
- Configure the optional settings in the other sections of the page.
- At the bottom of the page, select Save changes.
Step 6 (optional): Store shopper details
With Adyen's tokenization, you can securely store payment details of your shoppers. This allows you to offer subscription payments, automatic top-ups to shopper accounts, and give your shoppers a faster checkout experience by using their stored card.
To set this up:
- In the Business Manager, go to Merchant tools > Site Preferences > Custom Preferences > Adyen.
- Store shopper details: recurring. Select Yes to enable stored payment methods for recurring transactions, where you can complete the payment without the shopper being present.
- Store shopper details: one-click. Select Yes to enable stored payment methods for one-click transactions, where the shopper needs to enter their CVC/CVV to complete the payment.
- Enable the Guest user shopper reference, when storing shopper details of guest users. Go to Site Preferences > Order > Generate Customer No. for Guest Orders > Yes.
Payment details are stored in shopper accounts in the Salesforce platform. To be able to delete saved payment details from a shopper's account, you have to configure an additional setting. To set this up, contact our Support Team.
Step 7 (optional): Set up in-person payments
To process payments in your Commerce Cloud stores using payment terminals:
1: Enable in-person payments
- In the Business Manager, go to Merchant Tools > Ordering > Payment methods.
- Select AdyenPOS.
- Select Yes in the Enabled column.
- From the Payment Processor drop-down in the AdyenPOS Details section, select Adyen_POS.
2: Configure services
- In the Business Manager, go to Administration > Operations > Services.
- In the Profile column next to AdyenPosPayment, select Adyen.
- In the Name box, enter Adyen.
- In the Connection Timeout (ms) box, enter 100.000.
- Ensure that the Enable Circuit Breaker checkbox is not selected.
Step 8 (optional): Set up donations with Adyen Giving
If you enable Adyen Giving in your Business Manager settings, you also need to configure it in your Adyen Customer Area:
With Adyen Giving, your shoppers can seamlessly donate to charities of your choice at the checkout page of your website. To learn more about Adyen Giving, see Donations.
To use Adyen Giving with your Salesforce Commerce Cloud cartridge:
- Onboard with Adyen Giving.
- In the Business Manager, go to Merchant tools > Site Preferences > Custom Preferences > Adyen and set the following configurations:
Field | Description |
---|---|
Enable Adyen Giving | Set to True to enable Adyen Giving. |
Charity name | Name of the charity displayed on the Adyen Giving component. |
Charity merchant account | Merchant account name for charity. |
Amounts for donation | Suggested amounts that the shopper can choose to donate, in whole numbers. |
Description of charity | Description of the charity. |
Website from charity | Link to the charity website. |
Background image for Adyen Giving component | Background image of the Adyen Giving component. |
Logo in Adyen Giving component | Logo displayed on the Adyen Giving component. |
- In the Adyen Customer Area, go to Developers > Additional data.
- In the Card section, select the Variant checkbox.