Import an invoice with file attached

This endpoint allows you to import an invoice.

ℹ️ To ensure consistency, we will apply validations on amounts in accordance with our rounding policy. We allow a difference up to 1 cent per invoice_line between the total amounts and the sum of invoice lines. For further details, please refer to our article on rounding policy.

This endpoint requires the following scope: customer_invoices:all

Query Params
boolean
Defaults to true

If you are already using the X-Use-2026-API-Changes header, you can ignore this parameter.

The Pennylane API is introducing important changes, which will be rolled out in three phases: preview, sunset and cleanup.

For new user, please use this parameter with true value to opt in directly to the new version of the API.

Preview phase: From January 14th to April 7th 2026. Opt in by setting this attribute to true to test and migrate to the new behavior.

Sunset phase: From April 8th to June 30th 2026. The new behavior becomes the default. Set this attribute to false if you need additional time to migrate.

Cleanup phase: Starting July 1st 2026 The old behavior will no longer be available. You must have migrated by this point.

For more details, see our API documentation https://pennylane.readme.io/docs/2026-api-changes-guide for migration instructions.

Body Params
int64
required

File attachment id

boolean
Defaults to false

This will set the invoice to Incomplete status

date
required

Invoice date (ISO 8601)

date
required

Invoice payment deadline (ISO 8601)

int64
required

Customer identifier

string

Invoice number

string
enum
Defaults to EUR
string
required
length ≥ 1

Invoice currency amount before tax (total value before tax of the invoice in the currency of the invoice)

string
required
length ≥ 1

Invoice currency amount (total value of the invoice in the currency of the invoice)

string

Invoice amount in euros (total value of the invoice in euros). If the currency is euro, currency_amount and amount are identical.

string
required
length ≥ 1

Invoice taxable amount (in invoice currency)

string

Invoice taxable amount (in euros). If the currency is euro, currency_tax and tax are identical.

string | null

Custom label for the invoice used on accounting (ledger) entries. If not provided, Pennylane generates a label automatically.

transaction_reference
object

By adding this field you can automatically reconcile the newly imported invoice with a transaction. See documentation about automatic payment matching.

invoice_lines
array of objects
required
length ≥ 1
invoice_lines*
string
required
length ≥ 1

Invoice line total amount in the currency of the invoice.

string

Invoice line amount in euros. If the currency is euro, currency_amount and amount are identical.

string
required
length ≥ 1

Invoice line taxable amount (in invoice currency)

string

Invoice line taxable amount (in euros). If the currency is euro, currency_tax and tax are identical.

string
deprecated

Line item label.

This attribute is deprecated and will be removed soon.

number
required

Line item quantity (number of items)

int64

The ledger account ID

string
required

The unit price excluding taxes. Can be set up to 6 decimals.

string
required

Line item unit (type of unit)

string
enum
required

Product VAT rate. A 20% VAT in France is FR_200.

string | null
deprecated

The description of the invoice line

This attribute is deprecated and will be removed soon.

int64

The product ID

imputation_dates
object | null
ledger_entry_line
object
string

A unique external reference you can provide to track this customer invoice. If not provided, Pennylane will generate an identifier for you.

Responses

Language
Credentials
OAuth2
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json