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

# Transbank

> Set up a Transbank integration in the Payrails Portal to accept card payments in Chile through the WebPay Plus hosted payment page.

<picture noZoom>
  ![Transbank logo](https://assets.payrails.io/img/logos/transbank/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 **Transbank (WebPay Plus)** to accept payments in Chile
> * Accept **card** payments through WebPay's **hosted payment page**
>
> WebPay Plus uses a hosted payment page (redirect) integration: your shopper goes to Transbank to enter card details and complete authentication, so raw card data never passes through your checkout.

## Create and configure a Transbank integration in Payrails

Follow these steps to set up Transbank:

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

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

## Step 3: Configure your Transbank integration

> [!TIP]
>
> **What you'll need from Transbank**
>
> Before you begin, make sure you have the following information from your Transbank account manager:
>
> * **Commerce Code**
> * **Secret Key** (used to authenticate requests to Transbank's API)

### 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 Transbank](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/transbank-image-02.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=72cbf1a1b9498f40a0ee311b582e2a96)

### Commerce Code & Secret Key

**From your Transbank account manager**

* Obtain your **Commerce Code** & **Secret Key**.

**In Payrails**

* Paste the values into the **Commerce Code** and **Secret Key** fields.

![Payrails Commerce Code and Secret Key fields for Transbank](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/transbank-image-03.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=253442ff4099e43e05ecb34deb4b6cba)

### Payment methods

**In Payrails**

* Under **Payment methods**, enable **WebPay**.

![Payrails payment methods section with WebPay enabled](https://mintcdn.com/payrails-42074109/yf-DMcCRiMaVxlBA/images/docs/integrations/orchestration/transbank-image-04.png?fit=max\&auto=format\&n=yf-DMcCRiMaVxlBA\&q=85\&s=081a8c00b7a06a71dd4bbbd9e2c4c511)

***

## Request fields for Transbank

Send these fields in the [authorize request](https://docs.payrails.com/reference/authorizeaction.md), in addition to the standard authorize fields. **Required** fields must be present for the payment to succeed. Payrails sends **Optional** fields to Transbank 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 Transbank as the WebPay Plus amount. Use CLP. |

Transbank needs no `meta` fields. Payrails builds the buy order and session from the payment.

***

## Configure Transbank settings

Some Transbank integration settings change how Payrails processes your payments. The portal shows the same description when you hover over each setting.

### Manual capture enabled

Turn on **Manual capture enabled** if your Transbank commerce code uses deferred capture. Payrails then treats each WebPay Plus payment as authorized, and you capture it later with a [capture](https://docs.payrails.com/reference/captureaction.md) request. With the setting off, Payrails treats each payment as captured straight away.

Match the setting to your commerce code. The commerce code sets whether Transbank holds the funds or captures them.

***

## Enable the integration

**In Payrails**

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

Your Transbank integration is now ready to process payments.

## Next steps

1. Run a test payment in **test mode** using a [Transbank test card](https://www.transbankdevelopers.cl/documentacion/como_empezar#ambiente-de-integracion). Use a supported currency such as **CLP**.
2. Verify that:
   * The payment appears in your **Transbank** account.
   * 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

- [WebPay via Transbank](https://docs.payrails.com/docs/integrations/payment-methods/webpay/transbank.md)
- [WebPay](https://docs.payrails.com/docs/integrations/payment-methods/webpay.md)
- [Payment providers](https://docs.payrails.com/docs/integrations/payment-providers.md)


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