CNAB 500 layout — CCB and contract assignment
Layout of the assignment remittance in CNAB 500. It is the only CNAB accepted for CCB (ccb) and structured CCI (structured_cci), and it also works for installment contracts (contract) and discounted contracts (discounted_contract). Each detail record is an installment: lines with the same document number are the installments of the same note or contract.
In the flow described in Assignment by file. Duplicatas, CT-e, checks and promissory notes are not accepted in CNAB 500: use CNAB 444 or the instruments CSV.
When to use CNAB 500 or the CCB CSV
CNAB 500 carries only the essentials of the CCB: installments, present value, fixed rate, late interest, fine and drawee. Use the CCB CSV when the note has:
- a floating rate, amortization other than Price, or an issue amount different from the present value of the first installment;
- a payroll-deduction entity, banking correspondent or social security benefit as collateral (INSS payroll loans, for example): the configuration's modality may require them, and CNAB 500 does not carry them;
- borrower contact details, or different issue dates across the notes in the same file.
Step by step
- Build the header with the originator code (27–46), the originator and bank names filled in, and the file date (95–100), which becomes the issue date of every note and contract in the file.
- Write one line per installment, with occurrence
01and the configuration's species. - Repeat in every installment of the same note: the document number, the risk letter (150) and, for contracts, the rate (395–402).
- Close with the trailer and check that every line has 500 characters.
Filling rules
| Rule | Detail |
|---|---|
| Length | Every line has exactly 500 characters, not counting the line break |
| Line break | CRLF or LF, with no blank line after the trailer |
| Encoding | UTF-8 or Latin-1 (Windows-1252) |
| Amounts | 13 positions, 2 implied decimal places |
| Rates | 8 positions, 6 implied decimal places, as a monthly fraction: 00019900 = 0.0199 = 1.99% per month |
| Dates | DDMMYY |
| Drawee document | Digits only: CNPJ with 14 positions, CPF with 11 digits right-aligned. The check digit is verified |
| Characters | Outside the drawee name and address, only A-Z, a-z, 0-9, space and . / - , ( ) & |
| Blank or zero fields | Fill only with spaces or only with zeros, never mixed with other characters |
Header
| Position | Len. | Field | Req. | Accepted content |
|---|---|---|---|---|
| 001 | 1 | Record identification | Yes | 0 |
| 002 | 1 | File identification | Yes | 1 |
| 003–009 | 7 | Literal | Yes | REMESSA |
| 010–011 | 2 | Service code | Yes | 01 |
| 012–026 | 15 | Service literal | Yes | COBRANCA + 7 spaces |
| 027–046 | 20 | Originator code | Yes | Digits only. Code registered for the originator, linked to the assignment configuration |
| 047–076 | 30 | Originator name | Yes | Cannot be blank |
| 077–079 | 3 | Bank number | Yes | Digits only |
| 080–094 | 15 | Bank name | Yes | Cannot be blank |
| 095–100 | 6 | File date | Yes | DDMMYY. It is the issue date of every note and contract in the file |
| 101–108 | 8 | Free | No | Use spaces |
| 109–110 | 2 | System identification | Yes | MX |
| 111–117 | 7 | File sequence number | Yes | Digits only |
| 118–494 | 377 | Blanks | Yes | Spaces only |
| 495–500 | 6 | Record sequence number | Yes | 000001 |
In CNAB 500, the originator code is only checked for format when the file is read. A code that does not belong to an originator linked to the configuration makes the batch stop with no error report. Confirm the code before the first submission.
Detail (installment)
| Position | Len. | Field | Req. | Accepted content |
|---|---|---|---|---|
| 001 | 1 | Record identification | Yes | 1 |
| 002–020 | 19 | Blanks | No | Spaces |
| 021–022 | 2 | Co-obligation | Yes | 01 with, 02 without. Must match the assignment configuration |
| 023–024 | 2 | Special characteristic | Yes | 01–07, 09–12, 14–18, 35, 99, 00 or blanks |
| 025–028 | 4 | Operation modality (SCR) | Yes | Code from annex 3 of SCR 3040, or blanks |
| 029–030 | 2 | Operation nature | Yes | 00–04, 11–16, 32, 33 or blanks |
| 031–034 | 4 | Funding source | Yes | 0000, 0101, 0102, 0199, 0201–0213, 0299 or blanks |
| 035–036 | 2 | Risk class | Yes | 00, AA, A …H , HH or blanks |
| 037 | 1 | Free | No | Space or 0 |
| 038–062 | 25 | Participant control number | Yes | Installment identifier. Cannot be blank. It is what locates the installment in the settlement |
| 063–070 | 8 | Free | No | Spaces or zeros |
| 071–081 | 11 | Our number | No | Leave blank if not used. If filled, digits only, not all zeros, and not repeated in the file |
| 082 | 1 | Our number check digit | No | Blank or a digit other than 0 |
| 083–092 | 10 | Amount paid | Yes | Zeros |
| 093–094 | 2 | Free | No | Spaces |
| 095–100 | 6 | Settlement date | Yes | DDMMYY or 000000. Not used |
| 101–108 | 8 | Free | No | Spaces |
| 109–110 | 2 | Occurrence | Yes | 01 |
| 111–120 | 10 | Document number | Yes | CCB or contract number, repeated in every installment. It becomes the asset identifier |
| 121–126 | 6 | Due date | Yes | DDMMYY |
| 127–139 | 13 | Face value | Yes | Installment amount, 2 decimals |
| 140–147 | 8 | Free | No | Spaces or zeros |
| 148–149 | 2 | Species | Yes | See Species |
| 150 | 1 | Delinquency risk | Yes | A to G. The same in every installment of the note |
| 151–156 | 6 | Expected payment date | Yes | DDMMYY. Not used |
| 157–159 | 3 | Zeros | Yes | 000 |
| 160–161 | 2 | Assignor person type | Yes | 01 or 02 |
| 162–163 | 2 | Operation code | Yes | 00 to 30, or blanks |
| 164–173 | 10 | Blanks or zeros | Yes | 10 spaces or 10 zeros |
| 174–192 | 19 | Assignment term number | Yes | Cannot be blank |
| 193–205 | 13 | Present value (acquisition) | Yes | How much the fund pays for the installment, 2 decimals |
| 206–218 | 13 | Rebate amount | Yes | Zeros or digits |
| 219–220 | 2 | Drawee registration type | Yes | 01 CPF, 02 CNPJ |
| 221–234 | 14 | Drawee CPF/CNPJ | Yes | Digits only, with a valid check digit |
| 235–274 | 40 | Drawee name | Yes | Cannot be blank |
| 275–314 | 40 | Drawee address | Yes | Cannot be blank |
| 315–326 | 12 | Blanks | Yes | Spaces only |
| 327–334 | 8 | Drawee ZIP code (CEP) | Yes | 8 digits |
| 335–379 | 45 | Assignor name | Yes | Cannot be blank |
| 380 | 1 | Free | No | Space |
| 381–394 | 14 | Assignor CNPJ | Yes | Valid CNPJ, of the same company (same root) as the assignor of the configuration |
| 395–402 | 8 | Interest rate | Yes | Monthly fixed rate, 6 decimals: 00019900 = 1.99% p.m. |
| 403–410 | 8 | Late interest | Yes | Monthly, 6 decimals: 00010000 = 1% p.m. |
| 411–423 | 13 | Fine | Yes | Fraction with 4 decimals: 0000000000200 = 2% |
| 424–494 | 71 | Free | No | Spaces or zeros |
| 495–500 | 6 | Record sequence number | Yes | Digits |
Trailer
| Position | Len. | Field | Req. | Accepted content |
|---|---|---|---|---|
| 001 | 1 | Record identification | Yes | 9 |
| 002–494 | 493 | Blanks | Yes | Spaces only |
| 495–500 | 6 | Record sequence number | Yes | Digits |
Species
| Configuration | Species |
|---|---|
ccb and structured_cci | A credit operation species. Use 41 (CCB). Do not use 60, 61 or instrument species (01, 02, 06, 14, 51, 52, 53, 87) |
contract and discounted_contract | 60 or 61 |
How the CCB is built
- Grouping: lines with the same document number are installments of the same CCB. The document number becomes the note's number and identifier.
- Installments: numbered 1, 2, 3… in due date order.
- Issue date: the file date (header, 95–100).
- Purchase amount: sum of the installments' present values. The note's principal amount is the present value of the first line.
- Interest: fixed rate, 360 calendar-day basis, with the rate from 395–402. Price amortization.
- Late interest and fine: compound late interest (403–410) and percentage fine (411–423).
- Delinquency risk: the letter in 150 classifies the note. Different letters across installments reject the note, without bringing down the others.
- In a
structured_cciconfiguration, the note is registered as a CCB.
Contracts (species 60 and 61)
The contract rules of CNAB 444 apply, with two differences:
- The rate comes from 395–402 (fixed, monthly, 360 basis) and must be the same in every installment of the contract.
- The contract's issue date is the file date.
Example
ccb configuration. CCB CCB777 in two installments, species 41, risk A, rate of 1.99% p.m., late interest of 1% p.m. and fine of 2%. Every line has 500 characters.
01REMESSA01COBRANCA 00000000000000012345ORIGINADORA EXEMPLO SA 000BANCO EXEMPLO 011226 MX0000001 000001
1 02 0CCB777-01 00000000 000000000000000000 01CCB777 05012700000000520000000000041A0501270000200 TERMO-2026-0001 000000005098000000000000000100052998224725MARIA DE SOUZA RUA DAS ACACIAS, 50 01310100CEDENTE EXEMPLO LTDA 114447770001610001990000010000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000002
1 02 0CCB777-02 00000000 000000000000000000 01CCB777 05022700000000520000000000041A0502270000200 TERMO-2026-0001 000000005000000000000000000100052998224725MARIA DE SOUZA RUA DAS ACACIAS, 50 01310100CEDENTE EXEMPLO LTDA 114447770001610001990000010000000000000020000000000000000000000000000000000000000000000000000000000000000000000000000003
9 000004
Result: CCB CCB777, issued on 12/01/2026, installments of 520.00 on 01/05/2027 and 02/05/2027, purchase amount 509.80 + 500.00 = 1,009.80. Download the example.
Errors
These reject the whole file:
| Message | How to fix |
|---|---|
| The line length is incorrect. 500 characters were expected… | Pad the line with spaces up to 500 positions |
| The originator name / bank name is required… | Fill 047–076 and 080–094 in the header |
| The sequence number of the first header record must be '000001' | Use 000001 in 495–500 of the header |
| The assignment term number is required… | Fill 174–192 on every line |
| The assignor CNPJ is invalid… / The assignor name is required… | Fill 335–379 and 381–394 with the assignor's data |
| The instrument identification at the bank must contain only digits… | Leave our number (071–081) blank or fill it with digits only |
| If this information is not available, leave the field blank instead of filling it with '0' | Leave position 082 blank |
| The asset type '…' is a contract and can only be assigned in a contract assignment configuration | Use 41 in a CCB configuration |
| All installments of contract '…' must have the same interest rate… | Repeat the rate in every installment of the contract |
These reject only the line: assignor from another company, co-obligation different from the configuration, and repeated our number. If they affect every line, they reject the file.
This rejects only the note: "The document number '…' has different delinquency risk letters across installments". Use the same letter on every line of the CCB.