Are you looking for test card numbers?

Would you like to contact support?

Plugin icon

Set up the plugin in Magento

Install Adyen's plugin for Magento, and configure it in your Magento admin panel. 

Step 1: Install the plugin

Adyen's plugin for Magento is open-source and available on GitHub. The GitHub repository is connected to Packagist, so you can easily include it in your project through Composer.

Before you begin, make sure that you have installed Composer. In your command-line tool, go to the Magento folder and run the following commands:

  1. Install the plugin:

    composer require adyen/module-payment
  2. Enable the plugin: 

    bin/magento module:enable Adyen_Payment
  3. Execute the update scripts:

    bin/magento setup:upgrade
  4. Flush cache storage:

    bin/magento cache:flush

    If you are using a caching layer such as Varnish, you need to exclude the following URL pattern from being cached: /adyen/process/*.

(Optional) Use Express Checkout flows

Only possible with the Magento plugin v8.8.0 and later versions.

Express Checkout is available for Apple Pay and Google Pay. To activate the Express Checkout Module, go to the Magento folder and run the following commands in your command-line tool:

  1. Install the plugin:

    composer require adyen/adyen-magento2-express-checkout
  2. Enable the plugin: 

    bin/magento module:enable Adyen_ExpressCheckout
  3. Execute the update scripts:

    bin/magento setup:upgrade
  4. Flush cache storage:

    bin/magento cache:flush

Step 2: Run cron

To process webhook notifications, update cache, and close unfinished orders, you need to have cron running on your server. For instructions on how to set up cron in Magento, refer to Configure and run cron.

The cron job generation time interval for the adyen_payment group is set to 1 minute. 

Step 3: Configure the plugin in Magento

Before you begin, make sure that you have set up your Adyen Customer Area.

Configure the Adyen plugin in your Magento admin panel: 

  1. Log in to your Magento admin panel. 
  2. In the left navigation bar, go to Stores > Configuration
  3. In the menu, go to Sales > Payment Methods.
  4. Select Required Settings and fill out the following fields: 

For the Magento 2 plugin v8.4.0 or later there are two ways to configure the required settings for the plugin:

  • Automated:

    • We recommend this option if you are new to the Magento 2 plugin.
    • The required settings are configured automatically for you by using your API key.
    • You can also reconfigure your integration using this option, but in that case the older configuration will be lost.
  • Manual:

    • We recommend this option if you have used the Magento 2 plugin before or if you want to re-configure your plugin.
    • You manually generate credentials in your Customer Area to configure your integration.

If you are using a plugin version before v8.4.0, see the configuration options for older versions.

Field Description
Configuration Mode Select Automated.
Environment Select whether you want to use test or live environment.
Test/Live API Key The API key you generated in the Adyen test or live Customer Area.
Client key for Live/Test Automatically fetched from your Customer Area.
Merchant Account Name of your Adyen merchant account for which the payments will be processed.
Notification Username Automatically generated when the webhook configuration is automatically created in the Customer Area. This is the username for basic authentication that webhook notifications from Adyen will be using.
Notification Password Automatically generated. This is the password for basic authentication that webhook notifications from Adyen will be using.
Live prefix Automatically fetched from your Customer Area.
Frontend resources region Automatically set to Europe (default).
Charged currency

Currency used for Adyen payment processing. To make sure that payments are processed in the expected currency, you can only change this setting outside of the user interface. To change this setting, see Selecting charged currency.

Possible values:

  • Display currency (default) – The store view or display currency is used.
  • Global/Website currency – The base currency is used. Depending on how Magento is configured, this will be either the Global or the Website currency.
Enable debug logging Select Yes to enable debug logging on the Magento server.

Optional. Step 4: Configure advanced settings

Configure the advanced settings for the plugin: 

  1. Log in to your Magento admin panel. 
  2. In the left navigation bar, go to Stores > Configuration
  3. In the menu, go to Sales > Payment Methods.
  4. Select Advanced settings. Here you can find sections for configuring several advanced settings, explained below.

Magento order processing

In the Magento Order Processing section, you can configure the following fields:

FieldDescription
Use manual capture for PayPal

Select Yes if you want to use manual capture for your PayPal integration.

To change this setting, you first need to contact our Support Team.

Capture on shipment for open invoice methods (Klarna, Afterpay, and RatePAY)

Select Yes to automatically capture buy now, pay later (open invoice) payments such as Klarna, Afterpay, and Ratepay when a new shipment is created in Magento.

You can not use this functionality if you have enabled auto-capture for buy now, pay later payment methods.

Adyen Payment Notifications

This setting is only relevant if you perform offline refunds in Magento. 

If you already made an offline refund in Magento, and then make the same refund in the Adyen Customer Area, two credit memos may be created. To prevent this from happening, you can choose to ignore the REFUND notifications from Adyen: 

  • Set Ignore refund notification to Yes.

For more information about refunds, refer to Issue a refund.

Manual Review

Adyen's RevenueProtect allows you to configure rules for assigning a risk score to each payment transaction. Payments with a risk score above a certain threshold are automatically refused. In addition, you have the option to manually review payments that have triggered some fraud rules, but do not yet meet the threshold for automatic refusal.

You must have manual capture set up to use manual review with Magento. Without manual capture, the order status will not be updated on Magento, leading to processing issues.

In Magento, you can optionally set a separate status for orders under manual review. For that, configure the following settings: 

Field Description
Manual Review Status Status given to orders after receiving an AUTHORISATION notification, indicating that the order has come under manual review.
Manual Review Accepted Status Status given to orders after receiving a MANUAL_REVIEW_ACCEPT notification from Adyen. Only applicable if you chose to perform no action after accepting a payment under manual review.

Partial Payment

This feature is called Split Payment in version 7.3.0 and earlier.

This setting is only relevant if you want to partially refund payments. 

When you accept gift cards on the Adyen platform, your shopper can pay a part of the transaction amount with their gift card, and the remaining amount with another payment method. In case of a partial refund, you can customize how the individual payments are refunded. 

Select Refund Strategy and choose the strategy that you want to use. 

 Possible values:

  • Refund from first payment first – The shopper's first payment is refunded first. 
  • Refund from last payment first – The shopper's last payment is refunded first. 
  • Refund based on ratio – The payments are refunded in proportion to the split. 

For example, your shopper paid 100 euros in three parts, in the following order: 

  1. 20 EUR with gift card A.
  2. 50 EUR with gift card B.
  3. 30 EUR with credit card.

If you want to refund 60 EUR to the shopper, the above strategies would result in the following refunds: 

  • Refund from first payment first – 20 EUR to gift card A, and 40 EUR to gift card B. 
  • Refund from last payment first – 30 EUR to the credit card, and 30 EUR to gift card B. 
  • Refund based on ratio – 12 EUR to gift card A, 30 EUR to gift card B, and 18 EUR to the credit card. 

Security

To protect your server from unauthorised notifications, we strongly recommend that you set up HMAC signature validation for notifications.

HMAC signature validation is supported from plugin version 6.2.0 and later.

To set up HMAC signature validation:

  1. In your Adyen Customer Area, generate an HMAC key when you set up notifications. Make sure that you save the configuration and store the HMAC key securely.
  2. In your Magento admin panel, in the Security section, enter the HMAC key in the HMAC key test (HMAC key live) field.
  3. In your Magento admin panel, set the Check notification's HMAC signature field to Yes to enable HMAC validation for notifications coming from Adyen.

If you have not saved the HMAC key in the notification setup, and you configure it in the Magento admin panel, notifications might be rejected by the plugin until the HMAC key is saved in your Customer Area.

PWA

PWA is available from plugin version 8.0.0 and later.

If you have built a Magento headless integration, you can choose to add a custom return URL for redirect methods. This is the URL of the page that the shopper will return to after processing a payment or authentication on an external page.

Field Description
Payment Origin URL The URL of an external page from which the shopper will be redirected.
Payment Return URL The URL of the page to which the shopper will return. By default this is your website URL followed by /adyen/process/result.

Selecting charged currency

Charged currency selection is supported from plugin version 7.0.0 and later.

You can change the currency used for Adyen payment processing. The options are:

  • Display currency – The store view or display currency is used. This is the default setting.
  • Global/Website currency – The base currency is used. Depending on how Magento is configured, this will be either the Global or the Website currency.

To ensure that payments are processed in the expected currency, you can only change this configuration setting using the Magento CLI:

bin/magento config:set payment/adyen_abstract/charged_currency (base|display) [--scope=(store|website) --scope-code=(your scope code)]

3D Secure 1 behavior

Selecting 3D Secure 1 behavior is supported only in plugin version 6.7.X. Starting with version 7.0.0 the behavior is Auto.

You can choose how to redirect shoppers from the issuer page to your store. You can choose between Manual (default) or Auto.
The shopper is redirected from the issuer page to your store:

  • Manual – Redirect via an HTTP POST that includes the MD and PaRes variables. This is the default setting.
  • Auto – Redirect via an HTTP GET, using the redirectResult parameter. Use this setting if, due to technical limitations, you need to use the GET method instead of HTTP POST.

If you want to use the Auto setting, contact our Support Team to enable this for your account.

Then, do the following:

  1. Log in to your Magento admin panel. 
  2. In the left navigation bar, go to Stores > Configuration
  3. In the menu, go to Sales > Payment Methods.
  4. Select CreditCard API integration > Advanced Settings > 3DS1 Authorization Behavior.
  5. Select Auto.

Next steps