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

# Deutsche Bank

> Connect Deutsche Bank to Payrails for cards and Wero in Europe, covering your DB Gateway Europa API key, outgoing key, webhook key and notifications.

<picture noZoom>
  ![Deutsche Bank logo](https://assets.payrails.io/img/logos/deutschebank/logo.svg)
</picture>

> [!NOTE]
>
> **Who should use this guide**
>
> This guide is intended for merchants who:
>
> * Use **Payrails** as a payment orchestrator
> * Use **Deutsche Bank** through DB Gateway Europa for cards or [Wero](https://docs.payrails.com/docs/orchestration/payment-methods/wero/deutsche-bank.md)
> * Have access to the DB Gateway Europa dashboard

***

## Create a Deutsche Bank 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 Deutsche Bank**
>
> Before you begin, make sure you have your API key, outgoing key and webhook key. You find all three in the DB Gateway Europa dashboard under **My Company**.

***

## Step 1: Choose the provider

* Search for **Deutsche Bank** and select it.
* Select **Next step**.

***

## Step 2: Enter basic information

**In Payrails**

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

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

### Credentials

**In Payrails**

| Field | Value |
| :- | :- |
| **API Key** | Your DB Gateway Europa API key. Payrails authenticates every request with it. |
| **Outgoing Key** | Your DB Gateway Europa outgoing key. Payrails sends it with the API key on every request. |
| **Webhook Key** | Your DB Gateway Europa webhook key. Payrails uses it to verify the signature on Deutsche Bank's notifications. |

Payrails sends requests to the DB Gateway Europa test environment in test mode and to the live environment in live mode, so use the keys for the matching environment.

**In Deutsche Bank**

1. Log in to the DB Gateway Europa dashboard.
2. Go to **My Company**.
3. Copy the API key, the outgoing key and the webhook key.

### Payment methods

**In Payrails**

* Select the payment methods to enable for this integration: **Card**, [Wero](https://docs.payrails.com/docs/orchestration/payment-methods/wero/deutsche-bank.md) or both.

**In Deutsche Bank**

* Ask Deutsche Bank to turn on server-to-server card processing on your account before you select **Card**.
* Ask Deutsche Bank to activate Wero on your account before you select **Wero**.

### Webhooks or notifications

> [!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 Deutsche Bank with every payment, so you don't set it in the DB Gateway Europa dashboard.

Deutsche Bank signs each notification with your webhook key, and Payrails verifies the signature. Deutsche Bank sends a notification when a payment completes, when you capture or cancel it, and when a Wero refund settles.

### Additional data

**In Payrails**

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

***

## Request fields for Deutsche Bank

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 Deutsche Bank 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 | Use EUR. |
| `meta.customer.email` | Required | Sent as the customer's email. You can send `meta.customer.phone.number` instead. |
| `meta.order.billingAddress.city` | Required | Sent as the billing city. |
| `meta.order.billingAddress.postalCode` | Required | Sent as the billing postal code. |
| `meta.order.billingAddress.country.code` | Required | Sent as the billing country, for example `DE`. |
| `meta.customer.phone.countryCode`, `meta.customer.phone.number` | Optional | Sent as the customer's phone number, with the dialing code in front. |
| `meta.customer.name`, `meta.customer.lastName` | Optional | Sent as the customer's first and last name. Payrails also sends them as the name on the card when the card has no holder name. |
| `meta.order.billingAddress.street`, `meta.order.billingAddress.doorNumber` | Optional | Sent as the billing street address. |
| `meta.clientContext.ipAddress` | Optional | Sent as the customer's IP address. |
| `merchantReference` | Optional | Set when you create the execution. Sent as the reference on the customer's bank statement. |

***

## How Deutsche Bank handles cards

* Deutsche Bank authenticates card payments with 3D Secure. The response includes the redirect to the card issuer's challenge page, and Payrails reads the final result when the customer returns.
* When the authorize request carries an external 3DS result, Payrails sends it to Deutsche Bank, and Deutsche Bank skips its own challenge. The result needs the authentication value, the directory server transaction ID, and a transaction status of `Y` or `A`.
* Deutsche Bank supports instant and manual capture. With manual capture, you can capture the full amount or a lower amount once.
* You can cancel an authorized payment in full, and refund a captured payment in full or in part, as many times as you need up to the captured amount.
* Card refunds complete in the refund response.
* To verify a card without charging it, authorize an amount of `0.00`.

***

## Enable the integration

**In Payrails**

* Select **Enable integration**.
* Confirm the integration shows as **Enabled**.

Your **Deutsche Bank** integration is now ready to process payments.

***

## Next steps

1. Run a test payment in the DB Gateway Europa test environment.
2. Verify that:
   * The payment appears in the DB Gateway Europa dashboard.
   * 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

- [Wero via Deutsche Bank](https://docs.payrails.com/docs/orchestration/payment-methods/wero/deutsche-bank.md)
- [Wero](https://docs.payrails.com/docs/orchestration/payment-methods/wero.md)
- [Bank Transfers](https://docs.payrails.com/docs/orchestration/payment-methods/bank-transfers.md)


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