customer_invoices

In short

Invoices edited by the company managed on Pennylane for its customers. They can be edited and sent from Pennylane, or simply imported from other tools through diverse integrations.

This table is suited for incremental ingestion with an ETL tool. For standard data analysis, use schema pennylane.

Customer invoices can be directly edited on Pennylane, or imported from external invoicing tools into Pennylane through various integrations.

In case of simple PDF documents or images, invoices are first read by Pennylane’s OCR, and then manually validated by the user. This means that very recent invoices, not yet validated, may sometimes lack some information or hold errors in their data. For e-invoices or invoices edited on Pennylane, data is directly extracted in a reliable way.

Draft and archived invoices on Pennylane will not be included in this table.

See also: supplier_invoices.

Filter key(s)

company_id

Sorting key

ClickHouse skips blocks only when the filter starts with this key, in this order. When the first column is `company_id`, put `company_id` in every query. Read a fleet one company at a time, or in batches of `company_id`. Do not run one query with no company filter. List only the columns you need. `SELECT *` reads columns you will not use.

company_id, id

Available columns

id

Int64

Unique identifier of the invoice on Pennylane.

created_date

Date

Date of creation of the invoice on Pennylane, in YYYY-MM-DD format. This date is not necessarily the same as the invoice issue date.

issue_date

Nullable(Date)

Issue date of the invoice, in YYYY-MM-DD format. In rare situations, an invoice may be received late after the books for the associated fiscal period are closed. In this case, the issue date will default to the first day of the next open fiscal period.

deadline

Nullable(Date)

Invoice due date, in YYYY-MM-DD format.

company_id

Int64

Unique ID of the company on Pennylane, referring to companies.id.

company_name

String

Name of the company on Pennylane.

customer_id

Nullable(Int64)

Unique ID of the company's customer on Pennylane, referring to customers.id.

customer_name

Nullable(String)

Name of the company's customer, as configured on Pennylane. This name may differ slightly from the one displayed on the invoice.

amount_eur

Decimal(15, 2)

Total invoice amount in euros, including taxes. Potential currency conversions are applied when this field is filled.

amount_eur_excl_taxes

Decimal(18, 2)

Total invoice amount in euros, excluding taxes. Potential currency conversions are applied when this field is filled.

currency

LowCardinality(String)

Invoice currency.
Examples: "EUR", "USD", "CAD"

label

Nullable(String)

Label of the invoice, as displayed on Pennylane.
Examples: "Facture John Doe - F-2023-05-118", "Avoir XYZ - F-2022-06-426"

invoice_number

String

Invoice number, as specified on the invoice. This number is unique for any given supplier.
In the present case of customer invoices, it means this number is unique for a given company_id, but the same numbers could be used by different companies.
Examples: "F-2023-05-118", "F-2022-06-426"

source

Nullable(String)

Import source of the invoice on Pennylane.
Examples: "Email", "Google Drive", "Dropbox", "FEC"

is_paid

Bool

true the invoice has already been reconciled with its payment.
false otherwise.
An invoice can be set as paid automatically in the following cases:

  • when the payment is made via the Pro Account, Qonto or an SEPA XML file export ;
  • when a payment is scheduled.
We can as well mark it manually as paid.

outstanding_balance

Nullable(Decimal(15, 2))

Remaining amount to be paid for the invoice

group_uuid

Nullable(UUID)

Identifier of the group this record was matched into.

finalized_at

Nullable(DateTime64(6, 'UTC'))

Time the customer invoice was finalized.

payment_method

LowCardinality(String)

Payment method.

currency_amount

Decimal(17, 4)

Amount in the document currency.

external_id

String

Identifier of the record in the source system.

fec_pieceref

String

Piece reference used in the FEC export.

pdf_invoice_title

Nullable(String)

Title printed on the invoice PDF.

pdf_invoice_free_text

String

Free text printed on the invoice PDF.

pdf_invoice_subject

String

Subject printed on the invoice PDF.

created_at

DateTime64(6, 'UTC')

Timestamp of creation of the invoice on Pennylane.

updated_at

DateTime64(6, 'UTC')

Timestamp of last update of the invoice on Pennylane.

synchronized_at

DateTime64(6, 'UTC')

Timestamp of the last time this row version was written in ClickHouse.

deleted_at

Nullable(DateTime64(6, 'UTC'))

When the record was deleted. Empty when the record is still live. A row dropped by a company-level filter (draft, archived, unknown or deleted company) disappears with no deleted_at. Cascade those from etl.companies.


Back to top

Page last modified: Nov 23 2026 at 06:10 PM.