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

> A step-by-step guide for setting up your PayPlug integration in the Payrails portal.

<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**.
</Note>

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

## Step 2: Choose the provider

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

<img src="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" alt="Payrails provider selection set to PayPlug" className="mx-auto block rounded-lg object-cover border border-gray-200" width="100%" data-path="images/docs/integrations/orchestration/payplug-image-01.png" />

## Step 3: Configure your PayPlug integration

<Tip>
  **What you'll need from PayPlug**

  PayPlug supports **two credential modes**, both configurable on the same provider config. You can set up **either or both**:

  * **Payrails 3DS (external 3DS)**—*optional.* 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.

  **At least one of the two modes must be configured** for the integration to process payments.
</Tip>

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

<img src="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" alt="Payrails integration instance name field for PayPlug" className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/integrations/orchestration/payplug-image-02.png" />

### Payrails 3DS credentials (optional)

**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 falls back to the PayPlug 3DS credentials below (if configured).

<img src="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" alt="Payrails 3DS credentials fields for PayPlug" className="mx-auto block rounded-lg object-cover border border-gray-200" width="100%" data-path="images/docs/integrations/orchestration/payplug-image-03.png" />

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

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

<img src="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" alt="PayPlug 3DS credentials fields for provider-managed 3DS" className="mx-auto block rounded-lg object-cover border border-gray-200" width="100%" data-path="images/docs/integrations/orchestration/payplug-image-04.png" />

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

<img src="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" alt="Payrails generated notification URL field for PayPlug" className="mx-auto block rounded-lg object-cover border border-gray-200" width="100%" data-path="images/docs/integrations/orchestration/payplug-image-05.png" />

**In PayPlug (Dalenys back office)**

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

<img src="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" alt="PayPlug Dalenys back office notification settings" className="mx-auto block rounded-lg object-cover border border-gray-200" width="80%" data-path="images/docs/integrations/orchestration/payplug-image-06.png" />

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"`.

## 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](/docs/orchestration/payment-acceptance/test-payments)


## Related topics

- [Integrations](/docs/orchestration/integrations/index.md)
- [Payplug](/docs/analytics-and-reporting/getting-started/connect-your-data-sources/payplug.md)
- [Connect your data sources](/docs/analytics-and-reporting/getting-started/connect-your-data-sources/index.md)
