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:- Your organization set up with
ownership=self - Customer organizations created with
ownership=externaland roleBUYER - Tax registrations configured for jurisdictions where you sell
- Product/service definitions with appropriate tax categories
Invoice lifecycle
Every invoice follows this lifecycle:draft: Invoice is being prepared, can be modifiedfinalized: Invoice is issued, has a sequential number and datecancelled: 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, paymentamount…) are integers in the currency’s smallest unit:9900in 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.
"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 indraft status. You can:
- Review the calculated tax amounts
- Modify line items if needed
- Add payment terms or due dates
- Update billing addresses
Step 3: Finalize the invoice
When ready to issue the invoice, finalize it:- Assign a sequential invoice number
- Set the invoice date to the current date
- Calculate
due_datebased onpayment_terms(if provided) - Update the customer’s accounts receivable (AR) balance
- Lock the invoice from further modifications
- Generate the PDF file representing the invoice
Step 4: Mark as paid
When you receive payment from the customer, mark the invoice as paid:Recording partial or detailed payments
To record specific payment details:- 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:- Create a credit note referencing the original invoice
- Finalize the credit note
- The credit note automatically reduces the
amount_remainingon the invoice - 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: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
