- A sales invoice for the customer.
- One or more lines on a purchase invoice for the supplier’s share (self-billing).
Principles
- One order, one sales invoice. Put the order identifier of your system in
order_reference. - Purchases are usually aggregated. A supplier invoice typically covers several orders over a period. Each line keeps the
order_referenceof its own order, so the link between sale and cost is never lost. - Always set
periodon lines: it is the service date, independent of when you invoice or pay. See Accounting periods. - Store the returned
id(inv_...) next to your order. Lists can only be filtered byflow,customer_idandsupplier_id, and creating the same document twice creates two documents.
1. Create the sales invoice
order_reference and period from the document because it does not set its own. extratax_amount is an integer in the smallest currency unit (10000 = 100.00 EUR).
Then finalize it:
2. Add the supplier cost to a purchase invoice
Create a purchase invoice for the supplier and period you settle together. Each order is a line with its own references:issuer.type = CUSTOMER marks the invoice as self-billed. See Self-billing for the legal framework and the full lifecycle.
More than 10 items
Creation accepts up to 10 items. While the invoice is adraft, add the others with add_items, then finalize.
Choosing what a purchase invoice covers
Nocotax does not impose a granularity. What matters for reconciliation is that every cost line carries itsorder_reference and period. Common choices are one invoice per supplier and payout run, or one per supplier and month.
3. Check what you recorded
- The response contains the totals (
total_extratax_amount,total_tax_amount,total_tax_included_amount), in the smallest currency unit. - Compare the sum of your sales lines and cost lines per
order_referencewith your own data before going live.
Common mistakes
Next
Payments and payouts
Record customer payments and supplier payouts
Accounting periods
Understand which date drives which report
