Skip to main content

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.

Where this file is used

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​

RecordIdentification (position 1)Quantity
Header01, always the first line
Detail11 per installment
Complement2Optional, after an installment. It is checked and does not change the contract
Trailer91, 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​

RuleDetail
Fixed lengthEvery line has 400 positions. Shorter or longer lines reject the file.
Numeric fieldsRight-aligned, padded with zeros on the left.
Alphanumeric fieldsLeft-aligned, padded with spaces on the right.
Amounts13 positions, 2 decimal places, no comma or dot. R$ 1,234.56 → 0000000123456.
DatesDDMMYY format. E.g.: 10/15/2026 → 151026.
Extension.rem or .txt. CRLF or LF line breaks.

Header Record​

#PositionSizeFieldReq.Accepted content
1001–0011Record identificationYes0
2002–0021Remittance file identificationYes1
3003–0097Remittance literalYesREMESSA
4010–0112Service codeYes01
5012–02615Service literalYesCOBRANCA + 7 spaces
6027–04620Originator codeYesCode registered in the assignment configuration, right-aligned with zeros
7047–07630Originator nameYesCompany name
8077–0793Bank numberYesDigits
9080–09415Bank nameYesCannot be blank
10095–1006File dateYesDDMMYY
11101–1088BlanksYes8 spaces
12109–1102System identificationYesMX
13111–1177File sequential numberYesDigits
14118–394277BlanksYesExactly 277 spaces
15395–4006Record sequential numberYes000001
Originator code (positions 27–46)

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.

#PositionSizeFieldReq.Accepted content
1001–0011Record identificationYes1
2038–06225Participant control numberYesInstallment 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
3109–1102OccurrenceYes01 (entry)
4111–12010Document numberYesContract number. Repeat the same number on every installment of the contract
5121–1266Maturity dateYesDDMMYY
6127–13913Face valueYesInstallment amount, 2 decimals, greater than zero
7148–1492Instrument kindYes60 contract · 61 physical contract
8151–1566Issue dateYesDDMMYY. Same on every installment of the contract
9193–20513Present value (acquisition)YesPrice the fund pays for the installment (face value with the agreed discount), 2 decimals, greater than zero
10219–2202Borrower document typeYes01 individual (CPF), 02 company (CNPJ)
11221–23414Borrower document numberYesCNPJ with 14 positions; CPF with 11 right-aligned digits. The check digit is validated. Same on every installment of the contract
12235–27440Borrower nameYesCannot be blank
13275–31440Borrower addressYesCannot be blank. E.g.: AV EXEMPLO, 100
14327–3348Borrower postal codeYes8 digits, no hyphen
15395–4006Record sequential numberYesLine sequence
Positions 193–205

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​

#PositionSizeFieldReq.Accepted content
1001–0011Record identificationYes2
2002–394393Bank slip messages and discountsNoFree; not read
3395–4006Record sequential numberYes6 digits

Trailer Record​

#PositionSizeFieldReq.Accepted content
1001–0011Record identificationYes9
2002–394393BlanksYesExactly 393 spaces
3395–4006Record sequential numberYes6 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:

LineRecordDocument no.Control no.MaturityFace valuePresent valueResult
21CT400140000210/15/20261,500.001,400.00Contract CT4001, installment 1
32—————Complement, not read
41CT400140000111/15/20261,500.001,350.00Contract CT4001, installment 2
52—————Complement, not read
61CT400240000310/20/2026800.00760.00Contract CT4002, installment 1
72—————Complement, not read

Contract CT4001 enters with a purchase value of R$ 2,750.00 and CT4002 with R$ 760.00.