CSV layout — settlement
Spreadsheet for settling portfolio assets: one line per settlement, for any asset type. It is the only settlement file that accepts gloss, fine and refund.
In the flow described in Settlement by file. The spreadsheet must have the .csv extension.
Step by step
- Choose how to identify the assets for the whole file: by the asset identifier (
external_id) or by the contract number (contract_number). Put only the chosen column in the header. - Build the header with
asset_type,total_value,settlement_type,installment_numberand the identification column. Add the optional columns that all lines will use. - Write one line per settlement, with a settlement type allowed for the asset type (table).
- Save it as CSV in UTF-8, with no spaces around the values.
File format
| Item | Rule |
|---|---|
| Header | The first line, with lowercase names. Unknown columns are ignored |
| Separator | ; or ,, detected from the header. With ,, use a decimal point or put the value in quotes |
| Encoding | UTF-8, with or without BOM. Characters in another encoding are dropped without warning, and an identifier with an accent is no longer found |
| Amounts | . or , as decimal separator, no thousands separator (1.250,40 is rejected) and at most 2 decimal places |
| Dates | AAAA-MM-DD (YYYY-MM-DD) |
| Spaces | Values are not trimmed: " ccb" is different from ccb |
| Size | Up to 850,000 lines. Empty lines are skipped, but count in the numbering |
Columns
| Column | Requirement | Format and use |
|---|---|---|
asset_type | Required | Asset type, the same as registered in the portfolio. See Asset types |
total_value | Required | Settlement amount, positive, up to 2 decimal places. Zero only in the types that accept it (see the table) |
settlement_type | Required | Settlement type. See Settlement types |
installment_number | Column required; value conditional | Installment number, an integer starting at 1. Required in installment settlement types, unless the line uses installment_external_id. Empty in settlements of the whole asset |
external_id | Conditional | Asset identifier, up to 36 characters. Required when the file identifies by asset. Required for extension |
contract_number | Conditional | Contract number, up to 36 characters. Required when the file identifies by contract |
installment_external_id | Optional | Installment identifier, an alternative to installment_number. If the column is in the header, fill it in on every line |
collection_origin_type | Optional | Who paid: borrower (drawee), assignor (assignor) or collection_agent (collection agent). If the column is in the header, fill it in on every line |
new_maturity_date | Conditional | New maturity date. Required in asset_extension and forbidden in the other types |
remaining_face_value | Optional | Face value balance that remains in the installment. Only in installment_amortization and never for contracts |
The file identifies assets by external_id or by contract_number. If both columns are in the header, contract_number applies to every line and external_id is ignored. With neither, the file is rejected. To mix them, send two files.
Who paid (collection_origin_type)
- Without the column, the origin is the one in the fund's settlement configuration, if any.
- With the column, each line's value prevails.
collection_agentrequires the fund's settlement configuration to have a default collection agent document. Without it, the line is rejected withSET000078.
Asset types
| Group | asset_type |
|---|---|
| Credit operations | ccb, cce, structured_ccb, structured_cce, structured_nce, structured_cci |
| Credit rights | duplicata_mercantil, duplicata_servicos, cte, check, promissory_note, discounted_contract, legal_fees, credit_card_bill, receivable_unit, private_label_credit_card_receivable |
| Securities | commercial_paper |
| Contracts | contract, financing_contract, debt_acknowledgment |
Settlement types
settlement_type | What it does | Credit operations and securities | Credit rights | Contracts | Installment | total_value |
|---|---|---|---|---|---|---|
asset_settlement | Full settlement of the asset | Yes | Yes | Yes | No | Zero or more |
asset_amortization | Partial payment of the asset | Yes | Yes | Yes | No | Greater than zero |
installment_settlement | Settlement of the installment | Yes | No | Yes | Required | Zero or more |
installment_amortization | Partial payment of the installment | Yes | No | Yes | Required | Greater than zero |
gloss | Gloss: write-off of the installment without payment | Yes | No | No | Required | Greater than zero |
asset_extension | Maturity extension | No | Yes, by external_id | No | No | Zero or more |
installment_fine_payment | Payment of the installment fine | Yes | No | No | Required | Greater than zero |
installment_partial_refund | Partial refund of the installment | Yes | No | No | Required | Greater than zero |
- "Installment required" means: fill in one and only one of
installment_numberandinstallment_external_id. - For contracts, only the first four types are accepted. The others reject the file.
- For gloss, provide a positive amount: the system records it as an outflow.
File rules
These reject the whole file (file reading):
- Required column missing from the header (
missing_fields). asset_type,settlement_type,total_value,installment_numberornew_maturity_datein the wrong format.- Empty identifier in the chosen column.
collection_origin_typecolumn present with an empty line or a value outside the list.new_maturity_datemissing in an extension, or present in another type.remaining_face_valueoutsideinstallment_amortization, or for a contract.- For contracts: settlement type outside the four accepted ones, installment missing in installment types, installment provided in both columns at once, or
installment_numberless than 1.
These reject only the line (validation against the portfolio): asset not found, repeated settlement in the batch, payment already made on the same date and the other reasons listed in Settlement by file.
Examples
Identification by asset, separated by ;:
asset_type;total_value;settlement_type;external_id;installment_number;collection_origin_type;new_maturity_date
ccb;1250,40;installment_settlement;CCB-7781;3;borrower;
duplicata_mercantil;2500,00;asset_settlement;DM-000123;;assignor;
duplicata_mercantil;0;asset_extension;DM-000125;;borrower;2027-01-15
| Line | Reading |
|---|---|
| 1 | Pays installment 3 of the CCB CCB-7781, by the drawee |
| 2 | Repurchase of the duplicata DM-000123, paid by the assignor |
| 3 | Extends the maturity of the duplicata DM-000125 to 01/15/2027 |
Identification by contract:
asset_type;total_value;settlement_type;contract_number;installment_number;collection_origin_type
contract;2500,00;installment_settlement;CT-000104;2;borrower
financing_contract;10000,00;asset_amortization;FM-000210;;assignor
With , as the separator, use a decimal point: ccb,1250.40,installment_settlement,CCB-7781,3,borrower,.
Errors
| Message | How to fix |
|---|---|
missing_fields: [...] | Include the required columns and external_id or contract_number |
malformed csv unable to read | Save it as CSV, separated by ; or , |
invalid asset_type: … | Use a type from the table, with no surrounding spaces |
invalid total_value: … | Amount without a thousands separator |
invalid settlement_type: … | Use a type from the table |
invalid external_id: / invalid contract_number: | Fill in the identifier on every line |
invalid collection_origin_type: … | Fill in the origin on every line, or remove the column |
new_maturity_date is required for settlement_type asset_extension | Provide the new date for the extension |
new_maturity_date is only allowed for settlement_type asset_extension, not: … | Leave the date empty in the other types |
remaining_face_value is only allowed for settlement_type installment_amortization, not: … | Use the balance only in the partial payment of an installment |
settlement_type … is not allowed for contracts, only: [...] | For contracts, use settlement or partial payment, of the asset or the installment |
inform only one of installment_number or installment_external_id for contracts | Fill in only one of the two columns |
Number of lines exceeded maximum allowed | Split the file into batches of up to 850,000 lines |