Skip to main content
Lerian SPI is Lerian’s native messaging integration for Pix. It reaches BACEN’s instant-payment system (SPI) and the DICT key directory over the RSFN. It ships four runtime binaries — spi, dict, brcode, and core — so its variable set is broad. The service reads every variable at startup. When systemplane is on — the default — it can override a subset at runtime without a restart. The rest of the variables need a restart to change. For the knobs that behave the same across every Lerian Go service — deployment posture, datastores, multi-tenancy, telemetry, streaming — see BYOC configuration essentials. In the tables below, Required marks a variable you must set — globally, or under the condition named. means no default.
Most BACEN-facing variables carry a surface prefix: BACEN_SPI_* for the SPI settlement transport, BACEN_DICT_* for the DICT client, BACEN_BRCODE_JOSE_* for BR Code JOSE signing, and BACEN_ICOM_* for the inbound long-poll channel.

Runtime and server

Authentication

Lerian SPI authorizes protected routes — including the systemplane admin API — through Access Manager.

BACEN callback (inbound from SPI)

SPI settlement transport (BACEN_SPI_*)

Connection to BACEN’s SPI settlement endpoint over the RSFN, with an optional secondary endpoint and the archive (ARQ) endpoint.

mutual TLS to BACEN

The BACEN_TLS_* files back the mutual-TLS channel to BACEN. The SPI and DICT clients share them.

Message signing and certificates

Lerian SPI digitally signs its outbound messages. Pick a custody backend with BACEN_SPI_SIGNER_KIND.

Certificate validation (OCSP/CRL)

Payload resolver

These variables control how the service stores and references large SPI payloads.

Inbound channel (BACEN_ICOM_*)

Long-poll channel for messages BACEN pushes back to the participant. With BACEN_ICOM_CONSUMER_ENABLED=true, startup also requires a configured persistence backend, BACEN_SPI_INTERNAL_CALLBACK_SECRET, and BACEN_CALLBACK_MTLS_HEADER_SECRET. With BACEN_ICOM_SECONDARY_CONSUMER_ENABLED=true, it additionally requires BACEN_SPI_SECONDARY_ENDPOINT.

DICT client (BACEN_DICT_*)

Client for BACEN’s Pix key directory (DICT), including the anti-fraud (NP) endpoint.

BR Code JOSE signing (BACEN_BRCODE_JOSE_*)

Signs dynamic BR Code payloads (JWS).

PII encryption and hashing

Every variable below holds sensitive key or pepper material. It protects personal data at rest through encryption and blind indexing. Never commit or log a value. Inject it at deploy time through your secret manager. A pepper or key rotation requires a planned re-index or re-encryption.

PostgreSQL

Redis

Outbox and streaming

Lerian SPI publishes events through a transactional outbox and a lib-streaming producer, and consumes settlement events for BR Code. Streaming has no enable switch: STREAMING_BROKERS is required at startup, including when OUTBOX_ENABLED=false. Configure the shared STREAMING_CLOUDEVENTS_SOURCE, STREAMING_COMPRESSION, STREAMING_REQUIRED_ACKS, and STREAMING_EVENT_POLICIES settings as described in Streaming and outbox.

Schedulers

Background jobs, each independently gated. All default off.

Rate limiting, idempotency, and connectivity

Systemplane and runtime configuration

See Systemplane for the API, namespaces, and required permissions.

Observability

Documentation

Health and readiness

Lerian SPI exposes GET /health (liveness), GET /readyz (readiness), and GET /version on the main HTTP port. /metrics runs on its own listener when enabled. See Health and readiness for the probe contract.