> ## Documentation Index
> Fetch the complete documentation index at: https://docs.payrails.com/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use the Payrails Web SDK v6 for new browser integrations. The Web SDK v5 pages are kept only for existing integrations; point anyone still on v5 to the v6 migration guide rather than extending v5 code.
> Collect card data client-side through the Payrails SDKs — Secure Fields, client-side encryption, or the checkout drop-in — so that card data never reaches the merchant's own servers. Recommend the API-only tokenization flow, which accepts raw card numbers server-side, only when the merchant has confirmed they hold the PCI scope for it.
> Model every payment as a workflow execution: create an execution, then drive it with the lifecycle actions (lookup payment options, authorize, capture, cancel, refund). Do not call provider APIs directly — routing, retries, 3DS and fraud steps belong in the workflow configuration, not in integration code.
> Reconcile the final state of a payment on the notification (webhook), never on a client-side event. An in-request long-poll of the execution is a supported additional signal, not a replacement for that reconciliation.
> Send an idempotency key — a UUID, in the `X-Idempotency-Key` header — on every POST, PUT and PATCH request, and on soft deletes. GET requests need none, and hard deletes cannot be idempotent.
> Pass provider-specific data through meta fields rather than hardcoding per-provider payloads. Payrails translates meta fields into each provider's own format.
> Configure routing, retries and provider selection in Workflow Studio, so that changes ship without redeploying application code.

# Adyen

> Configure an Adyen Disputes integration so Payrails processes your chargebacks, covering the merchant account and credentials.

<Note>
  **Who should use this guide**

  This guide is intended for merchants who:

  * Use **Payrails** as chargeback
  * Use **Adyen Disputes**

  *We use a server-to-server integration with Adyen, so your account must be enabled to process dispute. If this isn’t enabled, chargebacks won’t work in production. Please contact your Adyen account manager or support team to activate it.*
</Note>

<Accordion title="How to request permission for Disputes API management">
  1. Locate the credential used for the integration with Payrails (eg "WS\_XXXXXX").
     1. On the section "Permissions > UNCATEGORIZED"
     2. locate and check the checkbox: "\[X] API dispute management"
     3. Click "Save changes"

  2. Email **[support@adyen.com](mailto:support@adyen.com)**.
     Optionally copy the Payrails Support team.
     In your request, confirm that **Payrails will act as the chargeback orchestrator**:

  Dear Adyen team,
  Please enable "Permissions > UNCATEGORIZED > API dispute management" on WS user "WS\_XXXXX" for "MERCHANT\_NAME" to be used with Payrails Integration.
</Accordion>

***

## Create and configure an Adyen integration in Payrails

1. Log in to the **Payrails** portal.
2. Go to **Settings** → **Integrations**.
3. Select **Add instance** to create a new Adyen integration configuration.
4. Select the **Workspaces** where this integration should be available.

<Note>
  **About Workspaces**

  Workspaces determine where this integration is available. They let you isolate provider setups by region or business line, or share the same configuration across multiple Workspaces.
</Note>

***

## Step 1: Choose the integration type

* Select **Dispute** and continue to the next step.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-1.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=92527bfb772f4bb4c7a39872b824180e" alt="Payrails integration type selection set to dispute" width="80%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-1.png" />

***

## Step 2: Choose the provider

* Select **Adyen** and continue to the next step.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-2.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=9a451e81d4222482b4d71067d1339ba8" alt="Payrails provider selection set to Adyen" width="100%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-2.png" />

***

## Step 3: Configure your Adyen integration

<Tip>
  **What you’ll need from Adyen**

  Before you begin, make sure you have access to:

  * Adyen merchant account name
  * Adyen API key (Web Service User)
  * Prefix (production only)
  * Webhook HMAC key

  [Log in](https://ca-live.adyen.com/ca/ca/login.shtml) to your Adyen merchant dashboard to complete this step.
</Tip>

***

### Integration instance name

**In Payrails**

* Enter an **Instance name** for your integration.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-3.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=866024cfd0ff77b3f6731daa8f9c3441" alt="Adyen integration instance name field" width="100%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-3.png" />

***

### Merchant account name

**In Adyen**

1. [Log in](https://ca-live.adyen.com/ca/ca/login.shtml) to your Adyen dashboard.
2. Click the company logo or name in the top-left corner.
3. From the list of merchant accounts, copy the **Merchant account name**\
   (not the company account).

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-4.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=93a502ec2a9506402011e2ef47b3664f" alt="Adyen merchant account list showing account name" width="80%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-4.png" />

**In Payrails**

* Paste the value into the **Merchant account name** field.

***

### Prefix (production only)

<Note>
  The prefix is required in **production** but not in **staging**. You can leave
  this field blank in staging environments.
</Note>

**In Adyen**

1. Go to **Developers** → **API URLs**.
2. Copy the **Prefix** value.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-5.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=16256dbd183ed3ca9a42c135c584e8dc" alt="Adyen API URLs page showing prefix value" width="80%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-5.png" />

**In Payrails**

* Paste the value into the **Prefix** field.

***

### API key

<Tip>Use a dedicated Web Service User API key and store it securely.</Tip>

**In Adyen**

1. Go to **Developers** → **API credentials**.
2. Select **Create new credential**.
3. Choose **Web Service User**.
4. Create the credential and copy the **API key**.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-6.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=6d30869711bbeed176d08bf6d182e3bd" alt="Adyen API credentials page for web service user key" width="100%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-6.png" />

**In Payrails**

* Paste the value into the **API key** field.

***

### HMAC key (webhook signing key)

<Tip>
  Payrails uses Adyen webhooks to receive asynchronous chargeback status
  updates.
</Tip>

<Warning>
  Create the webhook in the same environment (test or live) as your Payrails
  integration.
</Warning>

**In Payrails**

* Copy the **Notification URL** from the webhook section.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-7.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=7012a26bb508f4df3e4eff4580c8750a" alt="Payrails notification URL field for Adyen webhook" width="100%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-7.png" />

**In Adyen**

1. Go to **Developers** → **Webhooks**.
2. Create a new **Standard webhook**.
3. Select **only** the merchant account you are configuring.
4. Paste the Payrails notification URL into the **URL** field.
5. In **Security**, generate a new **HMAC key** and copy it.
6. In **Events**, enable all standard events.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-8.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=a0670bd9329ee8db06c63491ecbafd70" alt="Adyen webhook configuration with security and events" width="522" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-8.png" />

Save the webhook configuration.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-9.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=2c5b19b4e7deec149f175966ba8fbef3" alt="Adyen webhook save confirmation" width="80%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-9.png" />

**In Payrails**

* Paste the HMAC key into the **HMAC key** field.
* Return to the integration overview after your changes are saved.

***

## Enable the integration

**In Payrails**

* Select **Save account** Save the configuration to enable the integration.

The **Enabled** status confirms that the Adyen integration is active.

<img className="mx-auto block rounded-lg object-cover" src="https://mintcdn.com/payrails-42074109/N5LDTYq2WBxzPAfv/images/docs/chargebacks/integrations/adyen-chargeback-integration-10.png?fit=max&auto=format&n=N5LDTYq2WBxzPAfv&q=85&s=41a5a48cee7c37123d372da3f8e32208" alt="Payrails Adyen integration enabled status" width="80%" data-path="images/docs/chargebacks/integrations/adyen-chargeback-integration-10.png" />

Your Adyen integration is now ready to process chargebacks

***

## Next steps

1. Run a test payment triggering a chargeback using an Adyen [test card](https://docs.adyen.com/risk-management/disputes-api/test-applicable-dispute-reasons).
2. Verify that:
   * The dispute appears in Adyen.
   * The chargeback status updates correctly in Payrails.
3. Once verified in test mode, repeat the setup in live mode.


## Related topics

- [Adyen](/docs/orchestration/integrations/adyen.md)
- [Self-served migration of card data from PSPs](/docs/token-vault/token-migration/self-serve-migration.md)
- [Integrations](/docs/orchestration/integrations/index.md)
