Request a fee export
Requests the generation of a CSV file with the requester's fees, for all accounts or for a single account. The file is generated in the background: the response returns the export key, and the invoice_export webhook notifies you when the file is ready.
Endpoint
/billing/invoices/exportsAuthentication
Requires a signed request. See Authentication. The requester is the one whose credential signs the request.
Request body
All fields are optional. An empty body ({}) exports all of the requester's fees, subject to the size rule below.
| Field | Type | Required | Description | Size |
|---|---|---|---|---|
start_date | string | No | Start date of the period, in yyyy-mm-dd format, inclusive. | 10 |
end_date | string | No | End date of the period, in yyyy-mm-dd format, inclusive. Cannot be earlier than start_date. | 10 |
payment_method | string | No | Payment method of the fee. payment_method enumerator | — |
status | string | No | Fee status. status enumerator | — |
billing_types | array | No | Fee types (billing_type) to include. Empty includes all. | — |
owner_document_number | string | No | CPF or CNPJ of the account holder, digits only. Exports the fees of every account of that holder. | — |
account_number | string | No | Account number, without the check digit. | — |
owner_name | string | No | Beginning of the holder's name. The export includes the fees of the first 50 accounts returned by the holder name filter. | — |
account_key | uuid | No | Account key, to export the fee statement of a single account. Cannot be combined with the three fields above. | 36 |
Size rule
- Period of up to 31 days, counting both ends: the request is always accepted.
- Period longer than 31 days, or without
start_dateandend_date: the request is accepted if the requester (or the account, whenaccount_keyis sent) has up to 200,000 fees in the period, counted without the other filters. Above that, the response is422 BLL000136and no export is created. Choose a shorter period.
Exports in progress
- A request with the same filters as another export still in progress does not create a new export: the response returns the existing one, with
already_in_flight: true. - Each requester can have up to 20 exports in progress (
pendingorprocessing). The 21st receives422 BLL000134.
{
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"payment_method": "bank_slip",
"status": "open",
"billing_types": ["account_maintenance"],
"owner_document_number": "96969879003"
}
Response
| Field | Type | Description |
|---|---|---|
invoice_export_key | uuid | Export key. Use it to query the export. |
status | string | Export status. Export status enumerator |
filters | object | Normalized export filters: every body field, with null for those not sent. |
row_count | integer | Number of fees already written to the file. Final only in done. |
created_at | string | Date and time of the request. |
finished_at | string | Date and time the file became ready. null until done. |
expires_at | string | Date and time until which the file can be downloaded. null until done. |
file_name | string | Always null in this response. |
download_url | string | Always null in this response. The link is generated when the export is queried. |
already_in_flight | boolean | true when the response is an export in progress with the same filters. |
{
"invoice_export_key": "7a9c0a5e-1b2f-4c3d-9e8f-0123456789ab",
"status": "pending",
"filters": {
"start_date": "2026-09-01",
"end_date": "2026-09-30",
"payment_method": "bank_slip",
"status": "open",
"billing_types": ["account_maintenance"],
"owner_document_number": "96969879003",
"account_number": null,
"owner_name": null,
"account_key": null
},
"row_count": 0,
"created_at": "2026-10-15T14:03:11",
"finished_at": null,
"expires_at": null,
"file_name": null,
"download_url": null,
"already_in_flight": false
}
Errors
| Status | Code | Description |
|---|---|---|
| 400 | QIT000001 | Body out of format: unknown field, wrong type or account_key without 36 characters. |
| 400 | BLL000096 | Date not in yyyy-mm-dd format, or end_date earlier than start_date. |
| 400 | BLL000043 | status not in the enumerator. |
| 400 | BLL000130 | payment_method not in the enumerator. |
| 400 | BLL000137 | account_key sent together with owner_document_number, account_number or owner_name. |
| 404 | BLL000111 | One of the billing_types does not exist. |
| 404 | BLL000058 | account_key is not an account of the requester. |
| 422 | BLL000134 | The requester already has 20 exports in progress. Wait for one of them to finish. |
| 422 | BLL000136 | Period longer than 31 days with more than 200,000 fees. Choose a shorter period. |
The error body follows the standard format (title, description, translation, code). The table above lists the codes of this endpoint; platform-wide errors, such as QIT000001, are in the common errors of the BaaS error catalog.
Enumerators
payment_method enumerator
| Value | Description |
|---|---|
account_debit | Debit from the holder's account. |
centralizing_account_debit | Debit from the requester's centralizing account. |
bank_slip | Charged by bank slip (boleto). |
account_debit_and_bank_slip | Part debited from the account, the rest charged by bank slip. |
status enumerator
| Value | Description |
|---|---|
open | Open fee. |
pending | Awaiting payment. |
paid | Paid fee. |
written_off | Written-off fee. |
Export status enumerator
| Value | Description |
|---|---|
pending | Export registered, awaiting processing. |
processing | File being generated. |
done | File ready for download until expires_at. |
expired | File removed after the 7-day period. Make a new request. |
Related webhooks
When the file is ready, the requester receives the invoice_export webhook.
Next step
Query the fee export to get the download link.