Core Concepts
Before diving into code, here’s how the pieces fit together.
Entities
An entity is a business that issues invoices. It has its own:
- Documents (invoices, estimates, credit notes)
- Customers and Items (saved data)
- Settings (numbering, currency, language)
- Branding (logo, colors, templates)
Single business: Create one entity for yourself.
Platform: Create an entity for each of your customers.
Documents
By default, documents are finalized immediately with a number assigned:
┌─────────┐ ┌──────────┐ ┌─────────┐
│ Draft │ ──▶ │ Finalize │ ──▶ │ Final │
└─────────┘ └──────────┘ └─────────┘
│ │
│ • Editable │ • Locked
│ • Not numbered │ • Numbered
│ • Preview available │ • PDF/Email ready
└────────────────────────────────┘For editing before finalizing, create as draft:
┌─────────────────────────────────────────┐
│ Draft Invoice │
├─────────────────────────────────────────┤
│ • Add/remove line items │
│ • Change customer │
│ • Update amounts │
│ • Preview PDF │
│ • No document number assigned │
└─────────────────────────────────────────┘
│
▼ sdk.invoices.finalize(id)
┌─────────────────────────────────────────┐
│ Finalized Invoice │
├─────────────────────────────────────────┤
│ • Document number assigned │
│ • Immutable (create credit note to │
│ correct) │
│ • Ready for PDF/email delivery │
└─────────────────────────────────────────┘| State | Number | Editable | Fiscalized |
|---|---|---|---|
| Draft | No | Yes | No |
| Finalized | Yes | No | Yes (if applicable) |
Document types: Invoices, Estimates, Credit Notes, Advance Invoices.
Customers & Items
Save customers and items to reuse across documents.
Customers: Business details, addresses, tax IDs. Reference by customer_id when creating invoices.
Items: Products or services with pricing. Fetch and use when creating line items.
Both sync via API—keep your system as the source of truth.
Templates & PDFs
Each entity can customize:
- Invoice template style
- Logo and signature
- Colors and footer text
- Document language
PDFs are rendered on demand via the API.
Compliance
Set the entity’s country. We handle the rest:
- Tax calculations (multi-rate, gross/net pricing)
- EU cross-border (VIES validation, reverse charge)
- E-invoicing formats (UBL, country-specific)
- Fiscalization where required
- Rounding standards per country
Next
- Quickstart — Create your first invoice
- Multi-Tenancy — Entity model for platforms