Skip to main content
Base can either issue an invoice itself, or take a ready-made invoice issued externally (typically in your ERP/accounting system) and attach it to an order.

Issuing an invoice in Base

addInvoice issues an invoice for an order using a chosen numbering series.
The response returns invoice_id, which you then use for downloading the file (getInvoiceFile) or listing invoices (getInvoices).

Replacing it with an invoice from an external system

If you issue invoices in your own ERP (and don’t want to duplicate numbering in both Base and your system), use addOrderInvoiceFile — it replaces the standard Base invoice with your own PDF (or XML, for countries where that’s allowed, e.g. Brazil).
  1. Your ERP issues an invoice (number, PDF).
  2. In Base, create an invoice for the order via addInvoice (you just need a valid series_id — the specific number/rate doesn’t matter much since you’ll overwrite it shortly).
  3. Call addOrderInvoiceFile with the invoice_id from step 2, attach the PDF from your ERP, and set external_invoice_number to the real number from your system.
  4. Forwarding the invoice further to the marketplace (if the integration supports it) is typically tied to a specific order status — configured per integration, similar to tracking numbers. Timing (batches, not instant) is described in Automation and webhooks.
If you have more complex numbering-series logic (different cost centers, countries, VAT regimes), consider driving it via extra fields rather than hardcoded rules in the integration — it’s easier to maintain. Discuss non-trivial scenarios with the implementation team.