CNAB240 Segmento B — two Pix payments, addressed two ways
Two of the 240-character lines a Brazilian company sends its bank, and neither of them is a payment. A Segmento B carries who to pay a Pix, and the Segmento A above each one carries how much, when, and the name of who is being paid. Character 8 reads 3, a detail record, and character 14 reads B, which is what makes the other 226 characters a beneficiary's address rather than a payment; neither character is enough on its own. Notice what is missing from both lines. There is no name anywhere and no branch number either — a beneficiary here is a tax number, a key and an institution, and that is the difference a Pix makes to a file built around branches.
Read 015–017 before anything else, because it decides how ninety-nine characters much further along are filled. The first line carries for the random key a bank issues on request, and the key field from character 128 holds that key. The second carries the code for a tax number used as a key, and there the same field is completed with leading zeros instead. Ninety-nine zeros are what a correctly written record looks like and the address the payment actually travels on is the tax registration number at 019–032. A fixed-width layout whose contents are conditional on a field earlier in the same line is unusual, and the field table alone will not tell you what is in the record.
Two more things to count. The transaction identifier at 033–067 is thirty-five characters wide and the manual behind this record caps the value at thirty, because of the 240 positions the layout has to fit it into. That is a limit the file puts on Pix rather than one Pix puts on itself. And the last eight characters at 233–240 name the beneficiary's institution as an , the Banco Central do Brasil's identifier for a participant. The first three characters of the same line name a bank in Brazil's older three-digit compensation code. One record, two registries, and neither field says which one it belongs to.
SYNTHETIC / TRAINING ONLY. Every identifier here is constructed and none of it may be sent. The three-digit bank code 990 names no Brazilian institution, because Compe assigns nothing in the 900s. The two eight-digit ISPB values are built on the same stem and are not claimed not to be issued, because the Banco Central do Brasil's participant register was not read from here. Both fourteen-digit tax registration numbers end in digits that are not the check digits the twelve in front of them compute to, so neither can be a real CNPJ. That is the Cadastro Nacional da Pessoa Jurídica number that identifies a Brazilian company. The Pix key on the first line is a constructed string in the shape a random key takes, written as a shape to count characters against; no directory reachable from here could show it unregistered. Two choices in these lines are this site's and are disclosed for that reason. The manual behind this record publishes the forma de iniciação as two characters in a three-character field and does not say how the third is filled, so it is written here left-aligned with a trailing space. And the record page declines to state an alignment for the Pix key, because the manual states none, so the key is written left-aligned and space-filled to render the record rather than to teach a rule. Not validated against FEBRABAN's layout, against any bank's manual, or against Pix.
FULL CNAB240 Seg B (Pix) REFERENCE →
Sources for this sample — 5 sources
- Market practice
Manual CNAB240 Pagamentos V1.9 (16/04/2024) ↗ — Banco Inter · Manual CNAB240 Pagamentos V1.9, 16/04/2024 — the Segmento B field table for Pix from position 1 to 240 that every character in these two lines is placed against, the forma de iniciação code list, the rule that the key field is completed with leading zeros when the initiation method is a tax number, and the thirty-position cap on the transaction identifier
A bank's manual, not the standard: FEBRABAN's Layout Padrão CNAB240 is the authority and is cited separately. This document was read in full from a public copy; the URL given is the publisher's own site rather than the copy, because the copy's location is not a stable citation. Where this manual and another bank's disagree — and on the Pix key field they do — this site publishes the disagreement rather than choosing between them.
- Market practice
Pagamento a Fornecedores CNAB-240 (2024) ↗ — Sicredi · Pagamento a Fornecedores CNAB-240 — the competing reading in which the Pix key runs to 232 and the initiation code list differs; cited only for the disagreement the record page publishes, and never for a position these lines are built on
Seen through web-search result content only; the document itself was not opened. It is cited solely as the counterpart in a disagreement, never as the authority on any position. Search excerpts only, page not opened. The claim this entry supports is what the search content stated; nothing further is asserted.
- Scheme-specific rule
Layout Padrão CNAB240 ↗ — FEBRABAN (Federação Brasileira de Bancos) · named as the authority these positions were not checked against: FEBRABAN publishes the layout and each bank publishes its own manual derived from it
Published openly as a versioned PDF, and this entry does not claim to have opened it: febraban.org.br could not be fetched, so verification relied on two independent web-search excerpts.
The version and date carried here — V 10 11, 21/08/2023 — are read off the published file name rather than from the document itself. And search results list a second file carrying the same version string under a different date, so treat both as the publisher's naming and not as the layout's own declaration.
FEBRABAN revises the layout, and a revision moves field positions, so the version in force between a bank and its customer is what governs. Individual banks publish their own manuals derived from it and are free to use the reserved areas, which is why two banks' CNAB240 files can differ while both conform.
- Scheme-specific rule
Pix, the Instant Payment System (SPI) and the Reserve Transfer System (STR) ↗ — Banco Central do Brasil · what Pix is and what a Pix key is — the Banco Central do Brasil's instant payment system, addressed by a phone number, an email address, a tax number or a random string resolved through the DICT directory
Pix settles over the SPI (RTGS) in about three seconds; the STR is the wholesale reserve-transfer RTGS operated by the BCB.
- Simplified educational illustration
Payments Signal editorial teaching models — Payments Signal
What this simplifies: Fictional tax registration numbers, transaction identifiers, key and institution codes, and two lines rather than a file. A real remessa wraps them in a file header, a batch header, a batch trailer and a file trailer. Each Segmento B belongs to a Segmento A immediately above it that is not shown here. The three-digit bank code 990 is constructed, because Compe assigns nothing in the 900s. The two ISPB values are built on the same stem and are not claimed not to be issued, because the Banco Central do Brasil's participant register was not read. Both fourteen-digit registration numbers carry final digits the twelve in front of them do not compute to, so neither can be a real CNPJ. The random Pix key is constructed in the shape such a key takes and no directory reachable from here could show it unregistered. Two renderings are this site's choice and not a rule. The initiation method is written left-aligned with a trailing space, because the manual publishes two characters in a three-character field and does not say how the third is filled. The key is written left-aligned and space-filled, because the record page declines to state an alignment for a field whose width two manuals dispute. Not validated against FEBRABAN's layout, against any bank's manual, or against Pix.
Used wherever diagrams, scenarios, figures, or example values are didactic constructions rather than sourced facts; every such use carries a simplifications disclosure. All people, companies, banks, and list entries in examples are fictional.