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

# PayPlug

> Set up a PayPlug integration in the Payrails Portal to accept EUR card payments, with 3DS credentials and PayPlug notifications.

<picture noZoom>
  ![PayPlug logo](https://assets.payrails.io/img/logos/payplug/logo-full-bleed.svg)
</picture>

> [!NOTE]
>
> **Who should use this guide**
>
> This guide is intended for merchants who:
>
> * Use **Payrails** as a payment orchestrator
> * Use **PayPlug** to accept **card** payments in **EUR**
>
> PayPlug is a server-to-server card connector running on the Dalenys (ex-Be2bill) gateway — there is no hosted payment page. Your shopper enters card details directly in your checkout, and only sees a redirect to complete a **3DS challenge**, when one is required. PayPlug supports only **EUR**.

## Create and configure a PayPlug integration in Payrails

Follow these steps to set up PayPlug:

1. Log in to the **Payrails** portal.
2. Go to **Settings → Integrations → Payments**.
3. Select **Add instance** to create a new PayPlug 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.

## Step 1: Choose the integration type

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

![A screenshot showing the integration type selection form.](https://mintcdn.com/payrails-42074109/To59SEkYYPq19nmx/images/docs/orchestration/integrations/shared/integration-type-selection.png?fit=max\&auto=format\&n=To59SEkYYPq19nmx\&q=85\&s=2a1afe79c3ac25f3a8437846a1d36ffb)

## Step 2: Choose the provider

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

![Payrails provider selection set to PayPlug](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/payplug-image-01.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=79e2017cb19316692aafdb07188734fa)

## Step 3: Configure your PayPlug integration

> [!TIP]
>
> **What you'll need from PayPlug**
>
> PayPlug uses **two credential sets**, both on the same provider config:
>
> * **Payrails 3DS (external 3DS)** — *required.* An **Account ID** and **Account key** (secret) issued for external/Payrails-managed 3DS.
> * **PayPlug 3DS (provider-managed 3DS)** — *optional.* A separate **Account ID** and **Account key** (secret) issued for PayPlug-managed 3DS. If you set it up, enter both fields.
>
> Payrails uses the Payrails 3DS set when the authorize request carries complete external 3DS data, and the PayPlug 3DS set otherwise.

### Integration instance name

> An integration instance is a specific payment provider setup in Payrails. You can create multiple instances for each provider based on region, currency, or business needs. Choose a clear, consistent name, since it's used in routing.

**In Payrails**

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

![Payrails integration instance name field for PayPlug](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/payplug-image-02.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=88f02cdc138403b45797ba607d3fbdef)

### Payrails 3DS credentials

**In Payrails**

* Enter the **Account ID** and **Account key** provided by PayPlug for external (Payrails-managed) 3DS.

The connector uses these credentials whenever the authorize request carries complete external 3DS data. If external 3DS data isn't present, it uses the PayPlug 3DS credentials below. Without them, that payment fails.

![Payrails 3DS credentials fields for PayPlug](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/payplug-image-03.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=51f21cfcf1adc0e0fb75cbd04c7d4a37)

### PayPlug 3DS credentials (optional)

**In Payrails**

* To also enable provider-managed 3DS, enter the separate **Account ID** and **Account key** issued by PayPlug for this mode. Enter both: with only one, Payrails saves the configuration, but payments that use this mode fail.

Store your account keys securely. Payrails uses them to sign every request and to verify that notifications genuinely come from PayPlug.

![PayPlug 3DS credentials fields for provider-managed 3DS](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/payplug-image-04.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=7ff490a501448494c0ae88a751a5ea23)

### Payment methods

**In Payrails**

* Under **Payment methods**, enable **Card**.

## Configure notifications

PayPlug (Dalenys) sends form-encoded callbacks to a notification URL you configure on the PayPlug/Dalenys side.

**In Payrails**

* After saving your PayPlug configuration, copy the generated **notification URL** from the provider config.

![Payrails generated notification URL field for PayPlug](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/payplug-image-05.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=df6681cfcab90e35cb0b2fcdcdae8500)

**In PayPlug (Dalenys back office)**

1. Paste the Payrails **notification URL** into your notification settings.

![PayPlug Dalenys back office notification settings](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/payplug-image-06.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=3fc308f2ce41c1d6b50e538d1273974b)

2. PayPlug posts form-encoded callbacks (transaction ID, operation type, execution code, amount, currency, order ID, and more) to this URL. Payrails verifies the request signature and responds `HTTP 200 "OK"`.

## Request fields for PayPlug

Send these fields in the [authorize request](https://docs.payrails.com/reference/authorizeaction.md) 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 PayPlug when you include them. For more about meta fields, refer to [Meta fields](https://docs.payrails.com/docs/orchestration/meta-fields.md).

| Field | Status | Description |
| :- | :- | :- |
| `amount` | Required | Sent to PayPlug in minor units, in your PayPlug account's currency. |
| `merchantReference` | Required | Sent as the order ID. |
| `meta.order.description` | Required | Sent as the payment description. |
| `meta.customer.email` | Required | Sent as the client email. |
| `meta.customer.reference` | Required | Sent as the client identifier. |
| `meta.clientContext.ipAddress` | Required | Sent as the client IP. |
| `meta.clientContext.userAgent` | Required | Sent as the client user agent. |
| `instrument.holderName` | Optional | Sent as the card holder's full name. Payrails uses `meta.customer.name` and `lastName` when it's missing. |
| `meta.order.billingAddress` | Optional | Sent as the billing address: `street` and `doorNumber`, `city`, `postalCode`, `state` and `country.code`. |
| `meta.order.deliveryAddress` | Optional | Sent as the shipping address. |
| `meta.order.shippingType` | Optional | `pickup` or `digital`. Sent as the shipping address type when you send a delivery address. |
| `meta.customer.phone` | Optional | Sent as the mobile phone. |
| `meta.customer.createdAt` | Optional | RFC 3339 date-time. Sent as the account creation date. |
| `meta.risk.exemptionIndicator` | Optional | `lowValue`, `transactionRiskAnalysis` or `secureCorporate`. Sent as the 3D Secure exemption reason. |
| `meta.risk.threeDSMode` | Optional | Sets the 3D Secure preference for PayPlug-hosted authentication. |

***

## Enable the integration

**In Payrails**

* Select **Save account** to save the configuration and enable the integration.
* The **Enabled** status confirms that the PayPlug integration is active.

Your PayPlug integration is now ready to process payments.

## Next steps

1. Run a test payment in **test mode** using a PayPlug test card, in **EUR**:
   * **Frictionless:** Mastercard `5555 5555 5555 4444`, expiry `12/26`, CVV `123` — authorizes without 3DS.
   * **3DS challenge:** Visa `4022 0522 6704 0001`, expiry `12/26`, CVV `123` — triggers a 3DS redirect; complete the challenge on PayPlug's page.
2. Verify that:
   * The payment appears in your **PayPlug/Dalenys back office**.
   * The payment status updates correctly in **Payrails**.
3. Once verified in test mode, repeat the setup in **live mode**.

Continue to: [Test a payment](https://docs.payrails.com/docs/orchestration/payment-acceptance/test-payments.md)


## Related topics

- [Payment providers](https://docs.payrails.com/docs/integrations/payment-providers.md)
- [Payplug](https://docs.payrails.com/docs/integrations/data-sources/payplug.md)
- [Connect your data sources](https://docs.payrails.com/docs/integrations/data-sources.md)


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