What is an invoice?
An invoice is a commercial document issued by a seller to a buyer that records a transaction between two parties. In Nocotax, invoices are the primary way to document:- Sales to customers (revenue)
- Purchases from suppliers (costs)
- Commission arrangements between platforms and merchants
Invoice flows
Nocotax supports three invoice flows that determine the direction and purpose of the invoice:Sales flow
The sales flow (flow=sales) represents invoices your platform issues to customers for goods or services you’ve sold. This is your outbound invoicing.
- SaaS subscription invoices
- E-commerce order invoices
- Service booking confirmations
- Product sales
- Increases your accounts receivable (AR)
- Represents revenue for your business
- You are the supplier, customer is the buyer
- You charge tax (if applicable)
Purchases flow
The purchases flow (flow=purchases) represents invoices for goods or services you’ve purchased from suppliers. This is your inbound invoicing.
- Recording supplier invoices
- Self-billing for marketplace payouts
- Documenting costs and expenses
- Tracking amounts owed to suppliers
- Increases your accounts payable (AP)
- Represents costs for your business
- Supplier is the issuer, you are the customer
- You may be able to claim input tax
Default vs explicit organization IDs
When creating invoices, you can choose to specify organization IDs explicitly or let Nocotax use default values based on your account configuration.Default IDs (recommended)
If you omitsupplier_id or customer_id, Nocotax will use default values based on the flow:
| Flow | Default supplier_id | Default customer_id |
|---|---|---|
sales | Your organization (self) | Must be specified |
purchases | Must be specified | Your organization (self) |
Invoice structure
Every invoice contains the following key components:Header information
Basic invoice details:- Flow: Direction of the invoice (sales/purchases)
- Supplier: Organization providing goods/services
- Customer: Organization receiving goods/services
- document_number: Sequential invoice number (assigned when finalized)
- document_date: Invoice issue date (set when finalized)
- Currency: Three-letter ISO currency code
Line items
Individual products or services on the invoice:- description: What’s being sold
- quantity: How many units
- unit_extratax_amount: Price per unit excluding tax (in smallest currency unit)
- extratax_amount: Total line amount excluding tax (quantity × unit_extratax_amount)
- unit_tax_included_amount: Price per unit including tax
- tax_included_amount: Total line amount including tax (quantity × unit_tax_included_amount)
- taxes: A breakdown of taxes at the line item level.
Tax breakdown
Detailed tax information per line and invoice:- tax_id: Tax identifier
- percentage: Tax rate applied
- jurisdiction: Where the tax applies
- exemption: Exemption reason if applicable
Totals
Calculated amounts:- total_extratax_amount: Sum of all line items before tax
- total_tax_amount: Total tax across all line items
- total_tax_included_amount: Final amount including tax
Payment information
- payment_terms: Payment terms configuration (type and days)
- due_date: When payment is expected
- payment_status: OPEN, DUE, PAID, PARTIALLY_PAID
- amount_due: How much is still unpaid
- amount_overpaid: If a payment is recorded, the amount that exceeds the amount_remaining at the time it is recorded
- amount_paid: How much is recorded as paid
- amount_remaining: How much is still unpaid
Multi-currency support
Nocotax supports invoices in multiple currencies. Each invoice must specify its currency:- Currency is required when creating an invoice
- All amounts on an invoice must be in the same currency
- Currency cannot be changed after invoice creation
Invoice numbering
Invoice numbers are assigned automatically when you finalize an invoice. Nocotax ensures:- Sequential numbering: Each invoice gets the next available number
- Unique numbers: No duplicates within your account
- Per-flow numbering: Sales and purchases can have separate sequences
- Format customization: Configure your numbering format in settings
Draft invoices don’t have document numbers. Numbers are assigned only when you finalize the invoice via the
document_number field.Amounts in smallest currency unit
All monetary values in Nocotax are specified in the smallest currency unit:| Currency | Smallest Unit | Example |
|---|---|---|
| EUR, USD | Cents | €10.50 = 1050 |
| GBP | Pence | £25.99 = 2599 |
| JPY | Yen (no subunit) | ¥1,000 = 1000 |
Working with line items
Invoices support up to 10 line items per invoice at creation:Line item attributes
Each line item includes:description(required): Text description of the itemquantity(required): Number of unitsunit_extratax_amount(optional): Price per unit excluding tax.product.tax_code(optional): Tax category for automatic tax calculation
extratax_amount: quantity × unit_extratax_amountunit_tax_included_amount: Unit price including taxtax_included_amount: Total line amount including tax
Tax information
When automatic tax calculation is enabled, invoices include detailed tax breakdown:Common patterns
Pattern 1: Simple sales invoice
Pattern 2: Recording a supplier invoice
Next steps
Invoice Lifecycle
Learn about invoice statuses and state transitions
Managing Taxes
Configure tax calculations on invoices
Payments
Track and reconcile invoice payments
API Reference
Explore the complete invoices API
