Using AI coding agents like Claude Code or Cursor? Try the official Chargebee Agent Skills to speed up your development.Try now
ChargebeeAPI

Export Invoices

Idempotency Supported

This API triggers export of invoice data. The exported zip file contains CSV files with invoice-related data.

Invoice Export Best Practice

For a full export, Chargebee recommends exporting data in batches by using date filters. The table below provides examples of how to set the filters:

ScenarioFilter ExampleDescription
Export invoices updated after January 1, 2024invoice[updated_at][after] = "1704067200"Export invoices from January 1, 2024 onwards.
Export invoices for 2023invoice[updated_at][between] = "[1672531200,1704067199]"Export all invoices for the year 2023.
Export invoices for 2022invoice[updated_at][between] = "[1640995200,1672531199]"Export all invoices for the year 2022.

If the export still fails, further reduce the date range, for example:

ScenarioFilter ExampleDescription
Export for the second half of 2024invoice[updated_at][after] = "1717200000"Export invoices are updated after June 1, 2024.
Export for the first half of 2024invoice[updated_at][between] = "[1704067200,1717199999]"Export invoices updated between January 1, 2024, and May 31, 2024.
Export for the second half of 2023invoice[updated_at][between] = "[1685577600,1704067199]"Export invoices updated between June 1, 2023, and December 31, 2023.
Export for the first half of 2023invoice[updated_at][between] = "[1672531200,1685577599]"Export invoices updated between January 1, 2023, and May 31, 2023.

Note

The date ranges in the examples above are just suggestions; you can adjust the date window to fit your specific needs. If an export fails due to large data volume, reduce the date window further and retry the export.

Sample Request

Sample Result[JSON]

URL Format

POST https://[site].chargebee.com/api/v2/exports/invoices

Input Parameters

payment_owner
optional, string

optional, string filter

Payment owner of an invoice. Supported operators : is, is_not, starts_with, in, not_in

Example → payment_owner[is] = "payment_customer"

invoice
Parameters for invoice
pass parameters as invoice[<param name>]

Returns

Export object
Resource object representing export