CNAB 400 Layout — Installment Contracts
Layout of the installment contract assignment remittance file in the CNAB 400 collection standard (records 0, 1, 2 and 9). Each record 1 is one installment; installments with the same document number make up one contract.
This is the file sent in the flow described in Assignment by File, through the manager or consultant portal, or through the manager API. The 400 layout is only accepted in an installment contract (contract) or discounted contract (discounted_contract) assignment configuration. In any other configuration the file is rejected with the message "O layout CNAB 400 aceita apenas cessão de contratos, mas a configuração de cessão é de '…'."
Download sample file — fictitious data: replace the originator code in the header (positions 27–46) with yours before testing.
File structure
| Record | Identification (position 1) | Quantity |
|---|---|---|
| Header | 0 | 1, always the first line |
| Detail | 1 | 1 per installment |
| Complement | 2 | Optional, after an installment. It is checked and does not change the contract |
| Trailer | 9 | 1, always the last line |
Every line has exactly 400 characters, not counting the line break. The file is recognized as CNAB 400 by the length of its lines: do not strip trailing spaces.
General filling rules
| Rule | Detail |
|---|---|
| Fixed length | Every line has 400 positions. Shorter or longer lines reject the file. |
| Numeric fields | Right-aligned, padded with zeros on the left. |
| Alphanumeric fields | Left-aligned, padded with spaces on the right. |
| Amounts | 13 positions, 2 decimal places, no comma or dot. R$ 1,234.56 → 0000000123456. |
| Dates | DDMMYY format. E.g.: 10/15/2026 → 151026. |
| Extension | .rem or .txt. CRLF or LF line breaks. |
Header Record
| # | Position | Size | Field | Req. | Accepted content |
|---|---|---|---|---|---|
| 1 | 001–001 | 1 | Record identification | Yes | 0 |
| 2 | 002–002 | 1 | Remittance file identification | Yes | 1 |
| 3 | 003–009 | 7 | Remittance literal | Yes | REMESSA |
| 4 | 010–011 | 2 | Service code | Yes | 01 |
| 5 | 012–026 | 15 | Service literal | Yes | COBRANCA + 7 spaces |
| 6 | 027–046 | 20 | Originator code | Yes | Code registered in the assignment configuration, right-aligned with zeros |
| 7 | 047–076 | 30 | Originator name | Yes | Company name |
| 8 | 077 –079 | 3 | Bank number | Yes | Digits |
| 9 | 080–094 | 15 | Bank name | Yes | Cannot be blank |
| 10 | 095–100 | 6 | File date | Yes | DDMMYY |
| 11 | 101–108 | 8 | Blanks | Yes | 8 spaces |
| 12 | 109–110 | 2 | System identification | Yes | MX |
| 13 | 111–117 | 7 | File sequential number | Yes | Digits |
| 14 | 118–394 | 277 | Blanks | Yes | Exactly 277 spaces |
| 15 | 395–400 | 6 | Record sequential number | Yes | 000001 |
It is the originator identifier registered in the assignment configuration. A code that is not registered, or that is bound to another configuration, rejects the file. Request the code during the assignor onboarding.
Detail Record (installment)
One record per installment. Only the fields below are read; the other positions of the collection layout (e.g. 002–037, debit account and company identification) may be filled and are not used.
| # | Position | Size | Field | Req. | Accepted content |
|---|---|---|---|---|---|
| 1 | 001–001 | 1 | Record identification | Yes | 1 |
| 2 | 038–062 | 25 | Participant control number | Yes | Installment identifier in your system. Unique in the file and must not change after the assignment: it is how the installment is found in the settlement |
| 3 | 109–110 | 2 | Occurrence | Yes | 01 (entry) |
| 4 | 111–120 | 10 | Document number | Yes | Contract number. Repeat the same number on every installment of the contract |
| 5 | 121–126 | 6 | Maturity date | Yes | DDMMYY |
| 6 | 127–139 | 13 | Face value | Yes | Installment amount, 2 decimals, greater than zero |
| 7 | 148–149 | 2 | Instrument kind | Yes | 60 contract · 61 physical contract |
| 8 | 151–156 | 6 | Issue date | Yes | DDMMYY. Same on every installment of the contract |
| 9 | 193–205 | 13 | Present value (acquisition) | Yes | Price the fund pays for the installment (face value with the agreed discount), 2 decimals, greater than zero |
| 10 | 219–220 | 2 | Borrower document type | Yes | 01 individual (CPF), 02 company (CNPJ) |
| 11 | 221–234 | 14 | Borrower document number | Yes | CNPJ with 14 positions; CPF with 11 right-aligned digits. The check digit is validated. Same on every installment of the contract |
| 12 | 235–274 | 40 | Borrower name | Yes | Cannot be blank |
| 13 | 275–314 | 40 | Borrower address | Yes | Cannot be blank. E.g.: AV EXEMPLO, 100 |
| 14 | 327–334 | 8 | Borrower postal code | Yes | 8 digits, no hyphen |
| 15 | 395–400 | 6 | Record sequential number | Yes | Line sequence |
In the bank collection layout these positions usually carry the IOF, often zeroed. In the assignment they carry the installment present value: with zeros, the line is rejected.
Complement Record
| # | Position | Size | Field | Req. | Accepted content |
|---|---|---|---|---|---|
| 1 | 001–001 | 1 | Record identification | Yes | 2 |
| 2 | 002–394 | 393 | Bank slip messages and discounts | No | Free; not read |
| 3 | 395–400 | 6 | Record sequential number | Yes | 6 digits |
Trailer Record
| # | Position | Size | Field | Req. | Accepted content |
|---|---|---|---|---|---|
| 1 | 001–001 | 1 | Record identification | Yes | 9 |
| 2 | 002–394 | 393 | Blanks | Yes | Exactly 393 spaces |
| 3 | 395–400 | 6 | Record sequential number | Yes | 6 digits |
How installments become contracts
- Grouping: lines with the same document number (111–120) are the installments of the same contract, and this number becomes the contract identifier and number in the portfolio. The file may carry contracts of several borrowers.
- Consistency: every installment of a contract must have the same borrower document number and the same issue date; otherwise the file is rejected. The other borrower data comes from the contract's first line.
- Numbering: do not send installment numbers. Each contract's installments are numbered 1, 2, 3, … by maturity date.
- Participant control number: required and cannot repeat in the file.
- Amounts: the contract purchase value is the sum of its installments' present values. The 400 layout carries no rate, and the contract has no nominal rate.
Example
The sample file has two contracts:
| Line | Record | Document no. | Control no. | Maturity | Face value | Present value | Result |
|---|---|---|---|---|---|---|---|
| 2 | 1 | CT4001 | 400002 | 10/15/2026 | 1,500.00 | 1,400.00 | Contract CT4001, installment 1 |
| 3 | 2 | — | — | — | — | — | Complement, not read |
| 4 | 1 | CT4001 | 400001 | 11/15/2026 | 1,500.00 | 1,350.00 | Contract CT4001, installment 2 |
| 5 | 2 | — | — | — | — | — | Complement, not read |
| 6 | 1 | CT4002 | 400003 | 10/20/2026 | 800.00 | 760.00 | Contract CT4002, installment 1 |
| 7 | 2 | — | — | — | — | — | Complement, not read |
Contract CT4001 enters with a purchase value of R$ 2,750.00 and CT4002 with R$ 760.00.