> ## 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.

# Redsys

> Connect Redsys to Payrails for cards, Apple Pay, Google Pay and Bizum in Spain, covering your merchant code, terminal and notifications.

> [!NOTE]
>
> **Who should use this guide**
>
> This guide is intended for merchants who:
>
> * Use **Payrails** as a payment orchestrator
> * Use **Redsys** through a Spanish acquiring bank for cards, Apple Pay, Google Pay or [Bizum](/docs/orchestration/payment-methods/bizum/redsys)
> * Have the merchant code (FUC) and terminal number their bank issued for Redsys

***

## Create a Redsys integration in Payrails

1. Log in to the **Payrails** portal.
2. Go to **Settings** → **Integrations**.
3. Select **New integration**.

> [!TIP]
>
> **What you'll need from your bank**
>
> Before you begin, make sure you have the Redsys merchant code (FUC) and terminal number that your acquiring bank assigned to you. Payrails signs and encrypts every request to Redsys, so the integration form asks only for these two values.

***

## Step 1: Choose the provider

* Search for **Redsys** and select it.
* Select **Next step**.

![A screenshot showing Redsys selected as the provider.](https://mintcdn.com/payrails-42074109/E4YDXGsDOeAyCK_d/images/docs/redsys-image-01.png?fit=max\&auto=format\&n=E4YDXGsDOeAyCK_d\&q=85\&s=40e87f49236b8acdb80bc9407a63c009)

***

## Step 2: Enter basic information

**In Payrails**

* **Integration type**: keep **Payment** selected.
* **Integration name**: enter a clear, consistent name, for example `merchant_redsys`. Routing uses this name, so include the region or terminal when you run more than one Redsys integration.
* **Workspaces**: select the workspaces where this integration should be available.
* Select **Next step**.

![A screenshot showing the Redsys basic information step with integration type, name and workspaces.](https://mintcdn.com/payrails-42074109/E4YDXGsDOeAyCK_d/images/docs/redsys-image-02.png?fit=max\&auto=format\&n=E4YDXGsDOeAyCK_d\&q=85\&s=31b842ba822c303dc62e6f1d54677d6c)

> [!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.

***

## Step 3: Enter account information

### Redsys account details

**In Payrails**

| Field | Value |
| :- | :- |
| **Merchant Code (FUC)** | Your Redsys merchant code, up to 9 digits, as assigned by your acquiring bank. |
| **Terminal** | Your Redsys terminal number, up to 3 digits. |

Redsys activates features per terminal. If you use more than one terminal, create one integration for each terminal.

![A screenshot showing the Redsys account details fields for merchant code and terminal.](https://mintcdn.com/payrails-42074109/E4YDXGsDOeAyCK_d/images/docs/redsys-image-03.png?fit=max\&auto=format\&n=E4YDXGsDOeAyCK_d\&q=85\&s=9cd5830599f9f847b821a4dce166862b)

### Webhook

> [!NOTE]
>
> Payrails uses provider webhooks or notifications to receive asynchronous
> payment status updates.

The **Webhook** section shows the **Notification URL** for this integration. Payrails sends this URL to Redsys with every payment, so you don't set it in the Redsys administration portal.

![A screenshot showing the Redsys webhook section with the notification URL label.](https://mintcdn.com/payrails-42074109/E4YDXGsDOeAyCK_d/images/docs/redsys-image-04.png?fit=max\&auto=format\&n=E4YDXGsDOeAyCK_d\&q=85\&s=5d875e66df593bca18abe42d8977f902)

**In Redsys**

* Ask your acquiring bank to turn on online HTTP notifications for the terminal.

Redsys sends a notification for each operation on a payment: the authorization, captures, refunds, and cancellations. Bizum payments and 3D Secure challenges complete through these notifications.

* Select **Next step**.

***

## Step 4: Select payment methods

**In Payrails**

* Select **Card**, **Apple Pay**, **Google Pay**, **Bizum**, or any combination.
* Select **Next step**.

![A screenshot showing the Redsys payment methods step with Apple Pay, Bizum, Card and Google Pay.](https://mintcdn.com/payrails-42074109/E4YDXGsDOeAyCK_d/images/docs/redsys-image-05.png?fit=max\&auto=format\&n=E4YDXGsDOeAyCK_d\&q=85\&s=37397e75ae7ccad612ee936a8f6c8ecb)

**In Redsys**

* Ask your acquiring bank to activate Bizum on the terminal before you select **Bizum**. Refer to [Bizum via Redsys](/docs/orchestration/payment-methods/bizum/redsys).

***

## Step 5: Add additional data

**In Payrails**

* Optional. Select **Add field** to add key-value pairs that Redsys returns in the authorization notification. Payrails doesn't use them to process payments.

![A screenshot showing the Redsys additional data step with the Add field button.](https://mintcdn.com/payrails-42074109/E4YDXGsDOeAyCK_d/images/docs/redsys-image-06.png?fit=max\&auto=format\&n=E4YDXGsDOeAyCK_d\&q=85\&s=d8f972f1a696e07454e6f167dabb1167)

***

## Request fields for Redsys

Send these fields in the [authorize request](/reference/authorizeaction) for card payments, in addition to the standard authorize fields. **Required** fields must be present for the payment to succeed. Payrails sends **Optional** fields to Redsys when you include them. For more about meta fields, refer to [Meta fields](/docs/orchestration/meta-fields).

| Field | Status | Description |
| :- | :- | :- |
| `amount` | Required | Sent to Redsys as the amount and currency. Use EUR. |
| `meta.clientContext` | Required | When the payment goes through 3D Secure. Send `acceptHeader`, `userAgent`, `language`, `colorDepth`, `screenHeight`, `screenWidth`, `timeZoneOffset`, `javaEnabled` and `javaScriptEnabled`, which Payrails sends as browser details for 3D Secure. The Payrails SDKs fill them in for you. |
| `meta.clientContext.ipAddress` | Optional | Sent as the customer IP. |
| `meta.customer.name`, `meta.customer.lastName` | Optional | Sent as the card holder name. |
| `meta.customer.language` | Optional | Sent as the customer language. |
| `meta.order.description` | Optional | Sent as the product description. |
| `meta.risk.threeDSMode` | Optional | `Skip` turns 3D Secure off. Without it, or with `Force` or `Default`, the payment goes through 3D Secure. |
| `meta.risk.exemptionIndicator` | Optional | Sent as the SCA exemption. Use `transactionRiskAnalysis`, `lowValue` or `secureCorporate`. |

***

## Enable the integration

**In Payrails**

* Select **Enable integration**.
* Confirm the integration shows as **Enabled** under **Current integrations**.

Your **Redsys** integration is now ready to process payments.

***

## Next steps

1. Run a test card payment against your Redsys test terminal.
2. Verify that:
   * The payment appears in the Redsys administration portal.
   * The payment status updates correctly in Payrails.
3. Once verified in test mode, repeat the setup with your live terminal.

→ Continue to: [Test a payment](/docs/orchestration/payment-acceptance/test-payments)


## Related topics

- [Bizum via Redsys](/docs/orchestration/payment-methods/bizum/redsys.md)
- [Bizum](/docs/orchestration/payment-methods/bizum.md)
- [Integrations](/docs/orchestration/integrations.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.