A fully discounted line no longer kills the invoice
A line discounted to zero used to reject the whole invoice. Zero is now judged on the invoice total, with INVOICE_ZERO_AMOUNT.
A line whose final amount came to zero — a 100% discount, typically — was rejected with LINE_ZERO_PRICE and took the entire invoice down with it, even when every other line was charged. What the rule was actually there to prevent is a zero-euro invoice, which is legal but has no fiscal value.
The check now runs on the sum of the lines: a single free line is fine, an invoice that adds up to zero is rejected with the new code INVOICE_ZERO_AMOUNT. It applies to creating an invoice, updating a draft and everything that goes through line processing.
What else changed
LINE_ZERO_PRICEis still alive for corrective invoices, where a zero line is its own problem. What it no longer does is reject an ordinary invoice with one free line.- New code
INVOICE_ZERO_AMOUNTfor the case the rule really targets: the whole invoice adds up to zero. - A documentation fix in the same change. The
company_idpath parameter was described as "NIF (company)" while its schema is a UUID. Every mention in the contract that confused the identifier with the NIF is gone —company_idis the company's UUID.
Endpoints
- POST/v1/companies/{company_id}/invoicesA single zero line is accepted; an invoice totalling zero answers INVOICE_ZERO_AMOUNT
Where to go next
New webhook event: invoice.schedule_failed
`invoice.schedule_failed` tells you a scheduled invoice could not be issued, so you find out without opening the dashboard.
VeriFactu is always on in sandbox
A company created with a test key is born with VeriFactu on, and its NIF is registered on the first submission. Live is unchanged.