Order intake by file
BACEN delivers a remittance file. Order files use the codes
5301 and 5308 in production, and 5311 and 5318 in homologation. BACEN’s validation verdicts on the response files come back as 5303 and 5310 in production, and 5313 and 5320 in homologation. Each code identifies a distinct file flow.
A remittance file reaches the service in one of two ways:
- Lerian STA events. With
STA_CONSUMER_ENABLEDon, the service consumes the file events that Lerian STA publishes. - Notification endpoint.
POST /remittance-files/notificationssynchronously receives and parses a remittance object that is already stored. It accepts5301,5303, and5308, and their homologation codes.
5301 in production and 5311 in homologation) uses a fixed-width format with ISO-8859-1 encoding. The 2026 layout uses 684-character records, and the CNJ v1.11 layout uses 410-character records. SISBAJUD_REMITTANCE_LAYOUTS sets which layouts the service accepts. The leading positions set each record type. A header and a trailer mark the file boundaries. In the 2026 layout, a per-order permanent-block indicator marks each block record:
Block execution (bloqueio)
For a block order, Lerian SISBAJUD decrypts the encrypted CPF/CNPJ to query CRM. It does not resolve accounts by token alone. It then resolves the defendant accounts and executes the requested block through Midaz. An execution can create per-account block holdings. Every ledger transaction that Midaz accepts must be balanced. That invariant applies per accepted ledger transaction. It does not make an entire judicial order or a particular block or unblock leg a single double-entry transaction. The service records the block on each account. The order outcome feeds the response file to BACEN.
Permanent block
A permanent order (indicator P or D) does not stop after the first attempt. It stays in monitoring and re-attempts the block for the outstanding amount. This captures funds that arrive after the first attempt. A ledger balance-change event triggers a reattempt, and a scan every 5 seconds also processes open block orders. Both run only when
EXECUTION_ENABLED is on.
Reattempts stop at the court deadline when it falls within 60 days of the first execution. Otherwise they stop 60 days after the first execution, the CNJ reiteration ceiling. The stop takes effect when the permanent-block expiry job runs (PERMANENT_BLOCK_EXPIRY_ENABLED). With PERMANENT_BLOCK_EXPIRY_ENABLED off, the default, reattempts do not stop at the deadline.
Unblock (desbloqueio)
An unblock order releases previously held funds according to the order. It can release amounts across per-account block holdings. Each accepted ledger transaction must be balanced. An unblock order is not necessarily one ledger transaction. A background job picks up pending unblock orders while
EXECUTION_ENABLED is on.
Response files
Lerian SISBAJUD generates response files for BACEN:
- A block response (file type
5302in production,5312in homologation) answers block and unblock orders. - An information response (file type
5309in production,5319in homologation) answers information requests.
STA_TRANSFERS_ENABLED on, it submits each response file through Lerian STA.
The file-exchange transport itself is the client-owned integration that Lerian STA describes. Lerian SISBAJUD is one of its downstream source products.
