# Connecting Transbank

> Connecting to Transbank uses the commerce codes and API key secrets that Transbank issues for each product you use. If you don't have a commerce code yet, regis

Connecting to Transbank uses the commerce codes and API key secrets that Transbank
issues for each product you use. If you don't have a commerce code yet, register at
[tienda.transbank.cl](https://tienda.transbank.cl/).

Before you can take live payments, Transbank must validate your integration. Once you have a commerce
code, test your payments with a sandbox connection, then complete Transbank's validation (see
[Cómo empezar](https://www.transbankdevelopers.cl/documentacion/como_empezar#el-proceso-de-validacion),
in Spanish). When Transbank approves it, it gives you the API key secret for live payments and asks you
to make one small real purchase to confirm everything works.

## Setup

1. Select your **Account Currency**: **Chilean Peso (CLP)** (the default) or
   **United States dollar (USD)**.
2. Turn on each Transbank product you use and enter its credentials. Commerce codes
   are 12 digits; API key secrets are 64 characters.
   - **Enable Webpay Normal** — the Webpay hosted payment page for a single store.
     Enter your **Webpay Commerce Code** and **Webpay API Key Secret**.
   - **Enable Webpay Mall** — Webpay for a store within a Webpay Mall. Enter the
     store's **Webpay Merchant Commerce Code**, plus the mall's **Webpay Mall
     Commerce Code** and **Webpay Mall API Key Secret**.
   - **Enable OneClick Mall** — saved-card payments through OneClick. Enter the
     store's **OneClick Merchant Commerce Code**, plus the mall's **OneClick Mall
     Commerce Code** and **OneClick Mall API Key Secret**.
3. For each product, choose whether to turn on **Level 2 error codes enabled**. With
   it on, declines are reported using Transbank's more detailed level 2 response
   codes; with it off, the level 1 codes are used.
4. Select **Save**.

:::note[Older Transbank connections]
Connections set up on Transbank's older SOAP integration show their original
Webpay and OneClick public and private key fields, with an **Upgrade to REST
API** option. Turn it on and enter the REST credentials above to move the
connection across.
:::