> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# Indirect Pix (BTG) via Helm

> Deploy the indirect-participant Pix plugin with the plugin-br-pix-indirect-btg-helm chart, including the values the chart refuses to render without.

The Indirect Pix plugin processes Brazilian Pix instant payments as an indirect participant through BTG Pactual. Use it when your institution reaches the Pix network through a direct participant instead of connecting to BACEN itself. The chart name is `plugin-br-pix-indirect-btg-helm`.

<Note>
  The Indirect Pix plugin requires an Enterprise license. Contact Lerian for access to the plugin images and the deployment credentials.
</Note>

## What the chart installs

***

The chart installs five workloads, each with its own Deployment, Service, ConfigMap, Secret, HorizontalPodAutoscaler, and PodDisruptionBudget:

* **Pix**: the payment service, with an optional Ingress.
* **Inbound**: the worker that processes messages received from the direct participant.
* **Outbound**: the worker that sends payment messages and calls your webhook.
* **Reconciliation**: the worker that reconciles settled movements.
* **Schedule**: the worker that runs scheduled payments.

The chart also renders a mutual-TLS Secret when you enable that transport. It bundles PostgreSQL, Valkey, and MongoDB subcharts.

## Prerequisites

***

* A running Midaz deployment.
* A BTG Pactual partnership for indirect Pix participation.
* Enterprise license and registry credentials.
* Helm 3.8 or later for OCI registry support.

## Values you must set

***

The chart fails validation without them. Set them in your own values file before you install.

In `pix.configmap`:

| Key                                           | Purpose                                |
| :-------------------------------------------- | :------------------------------------- |
| `BTG_BASE_URL`                                | The direct participant's API host.     |
| `PIX_ISPB`                                    | Your institution's eight-digit ISPB.   |
| `MIDAZ_ORGANIZATION_ID` and `MIDAZ_LEDGER_ID` | The ledger that records the movements. |
| `ORGANIZATION_IDS`                            | The organizations the license covers.  |

In `pix.secrets`:

| Key                                         | Purpose                                                                                         |
| :------------------------------------------ | :---------------------------------------------------------------------------------------------- |
| `LICENSE_KEY`                               | Enterprise license validation.                                                                  |
| `BTG_CLIENT_ID` and `BTG_CLIENT_SECRET`     | Access to the direct participant's API.                                                         |
| `MIDAZ_CLIENT_ID` and `MIDAZ_CLIENT_SECRET` | Machine-to-machine access to Midaz.                                                             |
| `INTERNAL_WEBHOOK_SECRET`                   | Signs the messages the payment service sends to the inbound worker. Use at least 32 characters. |

Also set `outbound.configmap.WEBHOOK_CLIENT_URL` to the endpoint that receives payment notifications.

Leave the database passwords empty while the bundled subcharts are enabled. Each subchart generates its password into its own Secret, and the workloads read it from there. Set `DB_PASSWORD` and `MONGO_PASSWORD` only when you point the chart at external databases.

## Install

***

Read the current chart version first, then install:

```bash theme={null}
helm show chart oci://registry-1.docker.io/lerianstudio/plugin-br-pix-indirect-btg-helm
```

```bash theme={null}
helm install plugin-br-pix-indirect-btg \
  oci://registry-1.docker.io/lerianstudio/plugin-br-pix-indirect-btg-helm \
  --version <version> -n midaz-plugins --create-namespace -f values-custom.yaml
```

## Upgrade and uninstall

***

```bash theme={null}
helm upgrade plugin-br-pix-indirect-btg \
  oci://registry-1.docker.io/lerianstudio/plugin-br-pix-indirect-btg-helm \
  --version <new-version> -n midaz-plugins -f values-custom.yaml
```

```bash theme={null}
helm uninstall plugin-br-pix-indirect-btg -n midaz-plugins
```

## Resources

***

* [Pix documentation](/en/interfaces/pix/pix-overview)
* [Plugin Helm charts](/en/platform/deploy/plugins/plugins-helm-overview)
* [Helm chart repository](https://github.com/LerianStudio/helm)
