CSV layout — discounted contracts
Spreadsheet for the assignment of discounted contracts (discounted_contract). Unlike the installment contract, here each line is an asset: one installment of a contract, assigned and settled on its own. Lines with the same contract_number are installments of the same contract, and you can assign only some of them.
In the flow described in Assignment by file. Discounted contracts can also be submitted through CNAB 400, 444 and 500 with species 60 or 61, but in CNAB the total value and the number of installments of the contract are calculated only from the lines in the file. To assign through the API, see Asset creation — discounted contract.
Step by step
- Write one line per assigned installment, each with its own
external_id. - In the installments of the same contract, repeat the number, the issue date, the total face value, the number of installments and the drawee's document.
- In
installment_number, state which installment of the contract the line is. - Save as CSV in UTF-8 and submit it with the
.csvextension.
File format
| Item | Rule |
|---|---|
| Header | The first line, with the exact column names, in lowercase |
| Lines | One per assigned installment. Each line is an asset |
| Separator | Comma or semicolon, detected from the header |
| Encoding | UTF-8, with or without BOM |
| Values | Dot as the decimal separator, up to 8 decimal places, no thousands separator |
| Dates | YYYY-MM-DD |
| Documents | CPF 000.000.000-00 and CNPJ 00.000.000/0000-00, with the punctuation |
Columns
| Column | Requirement | Format and use |
|---|---|---|
asset_type | Required | discounted_contract |
external_id | Required | Up to 50 characters. Identifier of the assigned installment, unique in the file. It is the identifier used for settlement |
originator_document_number | Required | CPF or CNPJ of the originator, registered and linked to the configuration. The same on every line |
contract_number | Required | Up to 50 characters. Groups the installments of the same contract |
contract_issue_date | Required | Issue date of the contract. The same in the installments of the contract |
contract_total_face_value | Required | Face value of the whole contract, including the installments that are not in the file. The same in the installments of the contract |
contract_number_of_installments | Required | Total number of installments of the contract, an integer starting at 1. The same in the installments of the contract |
installment_number | Required | Number of this installment, from 1 to contract_number_of_installments. Not repeated within the same contract |
maturity_date | Required | Due date of the installment |
face_value | Required | Face value of the installment |
total_purchase_value | Required | How much the fund pays for the installment |
borrower_name | Required | Up to 255 characters |
borrower_document_number | Required | CPF or CNPJ with punctuation and a valid check digit. The same in the installments of the contract |
borrower_person_type | Required | natural_person or legal_person |
borrower_address_postal_code | Required | CEP 00000-000 |
borrower_email | Optional | Up to 255 characters |
borrower_address_street, _number, _neighborhood, _city, _uf, _country | Optional | As in the receivables CSV |
borrower_phone_area_code | Conditional | 2-digit area code. Required if the number is filled in |
borrower_phone_number | Conditional | 8 or 9 digits. Required if the area code is filled in |
File rules
All of these reject the whole file:
external_idrepeated in the file.installment_numbergreater thancontract_number_of_installments.- The same installment (
installment_number) twice in the same contract. - Installments of the same
contract_numberwith differentcontract_issue_date,contract_total_face_value,contract_number_of_installmentsorborrower_document_number. - Different originators across lines, or an originator not linked to the configuration.
- Any column out of format.
These reject only the installment, at registration: a receivable already past due on the assignment date (TRC100017), an invalid document (TRC000009) or half a phone number.
The spreadsheet does not check whether face_value is greater than total_purchase_value. Check it before submitting: the installment validation at registration may reject it.
Example
Installments 2 and 3 of a three-installment contract. Installment 1 is not assigned.
asset_type,external_id,originator_document_number,contract_number,contract_issue_date,contract_total_face_value,contract_number_of_installments,installment_number,maturity_date,face_value,total_purchase_value,borrower_name,borrower_document_number,borrower_person_type,borrower_address_postal_code
discounted_contract,CD-0001-01,11.222.333/0001-81,CD-0001,2026-10-01,3000.00,3,2,2026-12-10,1000.00,970.00,Joao da Silva,111.444.777-35,natural_person,01311-000
discounted_contract,CD-0001-02,11.222.333/0001-81,CD-0001,2026-10-01,3000.00,3,3,2027-01-10,1000.00,955.00,Joao da Silva,111.444.777-35,natural_person,01311-000
Errors
| Message | How to fix |
|---|---|
| The identifier '…' is duplicated. Each installment must have a unique identifier. | One external_id per line |
| Installment N is greater than the number of installments of the contract (M). | Fix installment_number or contract_number_of_installments |
| Installment N of the contract '…' is repeated in the file. | Keep each installment only once |
| All installments of the contract '…' must have the same …, but '…' and '…' were received. | Make the issue date, total value, number of installments and drawee equal across the installments |
| The field … must be a valid CPF (000.000.000-00) or CNPJ (00.000.000/0000-00). | Use the document with punctuation |