BACEN Message Types
FluxiQ SPB supports all 979 message types defined by the Brazilian Central Bank (BACEN) for communication over the RSFN (Rede do Sistema Financeiro Nacional). Messages follow the ISO 20022 standard adapted for the Brazilian financial system.
Message Type Naming Convention
BACEN messages follow the pattern {SYSTEM}{NNNN} where:
{SYSTEM}is a three-letter code identifying the settlement system{NNNN}is a four-digit sequential number
Each message has a corresponding response type prefixed with R1, R2, or R3:
| Response | Meaning |
|---|---|
| R1 | Protocol acknowledgement (message received) |
| R2 | Business validation result (accepted or rejected with reason) |
| R3 | Settlement confirmation or final status |
Settlement Systems
STR - Sistema de Transferencia de Reservas
The STR is BACEN's Real-Time Gross Settlement (RTGS) system. It processes high-value, time-critical transfers between financial institutions in real time.
Operating hours: 06:30 to 17:30 BRT (Brasilia Time)
| Message | Description |
|---|---|
| STR0001 | Reserve transfer request |
| STR0002 | Reserve transfer confirmation |
| STR0003 | Balance inquiry |
| STR0004 | Balance response |
| STR0005 | Statement request |
| STR0006 | Statement response |
| STR0007 | Transfer cancellation request |
| STR0008 | Transfer cancellation response |
| STR0009 | Scheduled transfer |
| STR0010 | Position inquiry |
<!-- Example: STR0001 Reserve Transfer Request -->
<DOC xmlns="http://www.bcb.gov.br/str">
<BCMSG>
<IdentdEmissor>12345678</IdentdEmissor>
<IdentdDesworko>99999999</IdentdDesworko>
<NUOp>2026010100001</NUOp>
<DtHrMsg>2026-01-15T10:30:00-03:00</DtHrMsg>
</BCMSG>
<SISMSG>
<STR0001>
<CodMsg>STR0001</CodMsg>
<NumCtrlIF>IF20260115001</NumCtrlIF>
<ISPBIF>12345678</ISPBIF>
<ISPBFav>87654321</ISPBFav>
<Valor>150000.00</Valor>
<DtMovto>2026-01-15</DtMovto>
<FinlddTrsf>1</FinlddTrsf>
</STR0001>
</SISMSG>
</DOC>LPI - Liquidacao por Prioridade Intradiaria
The LPI system handles intraday priority-based settlement, allowing institutions to manage liquidity by assigning priorities to pending transfers.
| Message | Description |
|---|---|
| LPI0001 | Priority transfer request |
| LPI0002 | Priority assignment |
| LPI0003 | Priority modification |
| LPI0004 | Queue position inquiry |
| LPI0005 | Queue position response |
TED - Transferencia Eletronica Disponivel
TED handles same-day electronic funds transfers between different financial institutions. Transfers via TED are settled in real time through the STR.
| Message | Description |
|---|---|
| TED0001 | TED transfer request |
| TED0002 | TED transfer confirmation |
| TED0003 | TED transfer rejection |
| TED0004 | TED return request |
| TED0005 | TED return confirmation |
| TED0006 | TED cancellation request |
DOC - Documento de Credito
DOC is used for credit transfers that are settled on the next business day (D+1). While less common since the introduction of Pix, it remains supported for legacy operations.
| Message | Description |
|---|---|
| DOC0001 | DOC transfer request |
| DOC0002 | DOC transfer confirmation |
| DOC0003 | DOC batch submission |
| DOC0004 | DOC batch response |
SEL - Sistema Especial de Liquidacao e Custodia
SEL handles the settlement and custody of federal government securities (titulos publicos federais).
| Message | Description |
|---|---|
| SEL0001 | Securities transfer request |
| SEL0002 | Securities transfer confirmation |
| SEL0003 | Custody position inquiry |
| SEL0004 | Custody position response |
| SEL0005 | Securities pledge |
| SEL0006 | Securities release |
| SEL0007 | Settlement instruction |
| SEL0008 | Settlement confirmation |
CTP - Cetip (Central de Custodia e Liquidacao)
CTP manages registration, custody, and settlement of private fixed-income securities, derivatives, and other financial instruments.
| Message | Description |
|---|---|
| CTP0001 | Instrument registration |
| CTP0002 | Registration confirmation |
| CTP0003 | Trade settlement request |
| CTP0004 | Trade settlement confirmation |
| CTP0005 | Position inquiry |
| CTP0006 | Position response |
LDL - Liquidacao Diferida Liquida
LDL handles deferred net settlement, where transactions are accumulated throughout the day and settled in net positions at designated settlement windows.
Settlement windows: 11:00, 14:00, and 17:00 BRT
| Message | Description |
|---|---|
| LDL0001 | Batch submission |
| LDL0002 | Batch acknowledgement |
| LDL0003 | Net position calculation request |
| LDL0004 | Net position result |
| LDL0005 | Settlement window status |
| LDL0006 | Settlement confirmation |
| LDL0007 | Bilateral net position |
CAM - Cambio (Foreign Exchange)
CAM handles foreign exchange operations registered with BACEN, including trade-related FX, financial FX, and interbank FX transactions.
| Message | Description |
|---|---|
| CAM0001 | FX contract registration |
| CAM0002 | FX contract confirmation |
| CAM0003 | FX settlement request |
| CAM0004 | FX settlement confirmation |
| CAM0005 | PTAX rate inquiry |
| CAM0006 | PTAX rate response |
| CAM0007 | FX position report |
CIR - Meio Circulante (Cash Operations)
CIR manages physical cash operations between financial institutions and the Central Bank, including cash ordering, deposits, and distribution logistics.
| Message | Description |
|---|---|
| CIR0001 | Cash order request |
| CIR0002 | Cash order confirmation |
| CIR0003 | Cash deposit notification |
| CIR0004 | Cash deposit confirmation |
| CIR0005 | Cash balance inquiry |
| CIR0006 | Cash balance response |
| CIR0007 | Cash transport schedule |
Message Processing in FluxiQ
Inbound Messages (BACEN to Institution)
- BACEN Gateway receives the XML message from IBM MQ
- Message is validated against the official XSD schema
- Digital signature is verified using BACEN's public certificate
- Message Processor routes to the appropriate domain service
- Domain service processes the business logic
- R1 acknowledgement is sent back via BACEN Gateway
defmodule BacenGateway.MessageRouter do
@doc "Routes inbound BACEN messages to domain services"
def route(%{system: "STR"} = msg), do: TransactionService.handle(msg)
def route(%{system: "LPI"} = msg), do: TransactionService.handle(msg)
def route(%{system: "TED"} = msg), do: TransactionService.handle(msg)
def route(%{system: "DOC"} = msg), do: TransactionService.handle(msg)
def route(%{system: "SEL"} = msg), do: SecuritiesService.handle(msg)
def route(%{system: "CTP"} = msg), do: SecuritiesService.handle(msg)
def route(%{system: "LDL"} = msg), do: SettlementService.handle(msg)
def route(%{system: "CAM"} = msg), do: ForexService.handle(msg)
def route(%{system: "CIR"} = msg), do: CashService.handle(msg)
endOutbound Messages (Institution to BACEN)
- Domain service creates a structured message map
- BACEN Gateway builds the XML from the official XSD template
- Message is digitally signed with the institution's HSM key
- XML is placed on the outbound IBM MQ queue
- BACEN Gateway awaits R1, R2, and R3 responses
- Status is updated in the originating domain service
Schema Validation
All messages are validated against BACEN's official XSD schemas before sending or after receiving. FluxiQ maintains an up-to-date copy of all schemas:
priv/xsd/
├── str/
│ ├── STR0001.xsd
│ ├── STR0002.xsd
│ └── ...
├── ted/
├── doc/
├── sel/
├── ctp/
├── ldl/
├── cam/
└── cir/Schemas are versioned and updated when BACEN publishes new catalog releases.