Adyen gateways
The Adyen gateway object and the allowed CRUD operations on the related resource endpoint
Configuring an Adyen payment gateway for a market lets you safely process payments through Adyen. The Adyen gateway is compliant with the PSD2 European regulation so you can implement a payment flow that supports SCA and 3DS2 by using Adyen's official JS SDK and libraries.
To create an Adyen gateway choose a meaningful name that helps you identify it within your organization and gather all the credentials requested (like merchant account, API key, etc. — contact Adyen's support if you are not sure about the requested data).
Adyen Uplift
Commerce Layer sends the shopper and order data required by Adyen Uplift to optimize fraud screening, authentication, and conversion. Any of these values you already pass in the payment request data are kept as is — Commerce Layer only fills in what's missing.
Payment methods
shopperEmail, shopperConversionId
Payments
riskData, accountInfo, merchantOrderReference, shopperConversionId
Card storage
accountInfo
Most of these values map directly from the order or the payment request data, with no special handling. Here's how the rest are sourced:
riskData— the device fingerprint collected by Adyen's Drop-in or Components. It's forwarded only if your checkout includes it in thepayment_request_dataattribute of the Adyen payment (e.g. by sending Adyen'sstate.dataas is).accountInfo— the account creation date, sent for registered customers only (guests are left out).merchantOrderReference— the order number, so that Adyen can link all the payment attempts of the same order.shopperConversionId— derived from the order, so that every Adyen request for the same checkout — payment methods and payments — carries the same value.
Adyen's notification system
Adyen's notifications are webhooks informing you of payment status updates and newly available reports. Notifications are the only way you'll receive automatic updates about requests that are processed asynchronously. To process payments asynchronously, set the async_api attribute to true as explained here.
If you create an Adyen gateway without a webhook_endpoint_secret, Commerce Layer configures a merchant-level Standard webhook pointing to webhook_endpoint_url through Adyen's Management API, generates its HMAC key, and stores the resulting webhook_endpoint_id and webhook_endpoint_secret. If a webhook with the same URL already exists on the merchant account, it is updated and reused instead of creating a new one. The webhook is removed from Adyen when the gateway is deleted.
To configure the webhook manually, set it up in Adyen's customer area pointing to webhook_endpoint_url, then copy its HMAC key into webhook_endpoint_secret.
Gateways configured manually can switch to automatic configuration at any time by updating them with the _update_webhooks trigger attribute: Commerce Layer adopts the webhook already pointing to webhook_endpoint_url (or creates a new one) and generates a new secret. To renew the secret only, use the _refresh_webhook_secrets trigger attribute.
Tokenization webhooks
Commerce Layer also supports Adyen's tokenization webhooks on the same webhook_endpoint_url. They must be registered as an additional, separate webhook in Adyen's customer area (selecting the Tokenization webhook type), with its own HMAC key stored on token_webhook_endpoint_secret.
recurring.token.created / recurring.token.alreadyExisting
Saves the card as a customer payment source, unless already saved.
recurring.token.updated
Marks the matching customer payment source as updated.
recurring.token.disabled
Deletes the matching customer payment source.
The customer is resolved from the token's shopper reference, and the card is linked to that customer's Adyen payment whose response carries the token's stored payment method ID — tokens that weren't created by a Commerce Layer payment aren't saved. A card notified by both a RECURRING_CONTRACT notification and a tokenization webhook is saved only once.
Last updated