Skip to main content

Overview

Customer invoicing is the sales flow where your platform issues invoices to end customers. This guide covers the complete lifecycle from creating a draft invoice through payment reconciliation.

Prerequisites

Before you can issue customer invoices, ensure you have:
  1. Your organization set up with ownership=self
  2. Customer organizations created with ownership=external and role BUYER
  3. Tax registrations configured for jurisdictions where you sell
  4. Product/service definitions with appropriate tax categories

Invoice lifecycle

Every invoice follows this lifecycle:
  • draft: Invoice is being prepared, can be modified
  • finalized: Invoice is issued, has a sequential number and date
  • cancelled: Invoice is voided. Only a finalized invoice can be cancelled, and cancelling it creates a credit note with the same items

Step 1: Create a draft invoice

Create a sales invoice with up to 10 line items in a single API call.

Key parameters

To record a complete order, including the supplier cost, see Record an order.

Amounts

Nocotax uses two conventions, and it is important not to mix them:
  • Accounting amounts (extratax_amount, tax_included_amount, totals, amount_remaining, payment amount…) are integers in the currency’s smallest unit: 9900 in USD = 99.00 USD.
  • Unit prices (unit_extratax_amount, unit_tax_included_amount) are decimal strings in the currency’s main unit: "99.2842" = 99.2842 USD.
In the example above, the first item costs "29.00" EUR per unit and the second "5.00" EUR per unit for 3 seats, so the line totals are 2900 and 1500 (in cents).
Setting automatic_tax_calculation.enabled: true will calculate tax based on:
  • Supplier and customer tax registrations
  • Product tax categories
  • Applicable tax rules for the transaction

Step 2: Review the draft

The created invoice is in draft status. You can:
  • Review the calculated tax amounts
  • Modify line items if needed
  • Add payment terms or due dates
  • Update billing addresses
While in draft status, the invoice has no invoice number and does not affect AP/AR balances.

Step 3: Finalize the invoice

When ready to issue the invoice, finalize it:
Finalizing the invoice will:
  1. Assign a sequential invoice number
  2. Set the invoice date to the current date
  3. Calculate due_date based on payment_terms (if provided)
  4. Update the customer’s accounts receivable (AR) balance
  5. Lock the invoice from further modifications
  6. Generate the PDF file representing the invoice
Once finalized, an invoice cannot be modified. To correct a finalized invoice, issue a credit note instead.

Step 4: Mark as paid

When you receive payment from the customer, mark the invoice as paid:
This marks the invoice as paid and updates the customer’s AR balance.

Recording partial or detailed payments

To record specific payment details:
This allows you to:
  • Record partial payments
  • Link to external payment references (Stripe, bank transfers, etc.)
  • Track payment dates separately from invoice dates

Payment status

Nocotax automatically tracks invoice payment status: A partially paid invoice keeps its open or due status. The amount_remaining field always shows how much is still owed.

Handling corrections

To correct a finalized invoice, issue a credit note:
  1. Create a credit note referencing the original invoice
  2. Finalize the credit note
  3. The credit note automatically reduces the amount_remaining on the invoice
  4. If needed, issue a new corrected invoice

Cancelling an invoice

To void a finalized invoice entirely, use the cancel endpoint. Nocotax creates the matching credit note for you:
Learn more about credit notes →

Next steps

Record an order

Sales invoice and supplier cost for one order

Self-Billing Guide

Learn how to record supplier purchases

Credit Notes

Issue corrections and refunds

Tax Calculations

Understand tax calculation logic

API Reference

View complete API documentation