If you want to migrate to a newer version of the Cartridge, see Migrating to version 20.1.0.
This page describes the integration steps for cartridge version 19.1.0 and higher, which is not compatible with the old HPP integration.
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
To set up the cartridge path in the Business Manager:
-
Go to Administration > Sites > Manage Sites > [yourSite] > Settings.
-
In the Cartridges box:
- 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 SFRA, enter:
-
Select Apply.
Step 2: Set up the Business Manager
In the following steps, you will need to copy over several settings from the Adyen Customer Area to the Business Manager.
-
In the Business Manager, go to Merchant tools > Site Preferences > Custom Preferences > Adyen.
Account structure
With Adyen, you have a single company account, together with one or more merchant accounts.
However, you can only have one merchant account for each storefront. -
In the merchantCode box, enter the name of your Adyen merchant account for which the payments will be processed. You can find this in the upper-right corner of your Customer Area.
-
Set Test/Production mode to (TEST).
-
To enable debug logging, set Enable Adyen debug mode to Yes. This shows the Pay button before redirecting to Adyen, allowing you to check the parameters sent in the request.
-
Select Save in the upper-right corner of the screen.
Step 3: Connect your Commerce Cloud store to Adyen API
To connect your Commerce Cloud store to the Adyen API, you need to set up an API key in the Adyen Customer Area, and copy it over to the Business Manager.
Set up an API key in the 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.
Copy the API key over to the Business Manager
- In the Business Manager, go to Merchant tools > Site Preferences > Custom Preferences > Adyen.
- In the X-API-KEY of Web service box, enter the API key from your Adyen Customer Area.
- Select Save in the upper-right corner of the screen.
Step 4: Receive payment status updates
To inform your Commerce Cloud store of payment status changes, Adyen uses notifications, sent as HTTP callbacks (webhooks) to endpoints on your server. To receive notifications, you need to enter your server's details in the Adyen Customer Area, and copy over the notification credentials to the Business Manager.
Set up notifications in the Adyen Customer Area
- Log in to your Customer Area. Switch to your merchant account.
- Select Developers > Webhooks.
- Select + Webhook.
- Under Recommended webhooks > Standard notification select Add.
- Select the toggle to make the standard notification 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.
Copy notification credentials over to the Business Manager
- In the Business Manager, go to Merchant tools > Site Preferences > Custom Preferences > Adyen.
- In the Adyen Notifications User and Adyen Notifications Password box, enter the username and password for notifications from your Adyen Customer Area.
- Select Save in the upper-right corner of the screen.
Test notifications
Test whether notifications have been configured correctly:
- In the Adyen Customer Area, switch to your merchant-level account (by selecting the name of your merchant account in the upper-right corner).
- Go to Developers > Webhooks.
- Next to Standard Notification, select the edit webhook icon .
- In the Test Notifications pane, select Test Configuration.
- If the result is [Accepted], your notifications are working correctly.
Configure scheduled jobs
Notifications 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 notification 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 (optional): Store shopper details
Adyen can securely store payment details of your shoppers. To set this up:
For more information about recurring transaction types, refer to Recurring payments.
- 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.