VAVANG INVOICE / DOCS / EN

Cancel an invoice

Invoice does not expose a destructive “cancel issued invoice” operation. Once fiscal data is frozen, the historical invoice remains immutable.

If a commercial invoice must be fully or partially reversed, represent the correction with a credit note. Do not delete the source invoice, rewrite its amounts or regenerate it with different fiscal data.

Full cancellation

For a complete reversal:

  1. keep the original invoice and its immutable snapshot;
  2. create a total credit note with its own number and an issue date that is not earlier than the original invoice;
  3. retain the reference to the corrected invoice;
  4. generate and validate the credit note compliance document;
  5. transmit the credit note according to your configured transmission mode.

The original invoice remains in history. The total credit note carries the opposite commercial correction without mutating that source record.

Partial cancellation

When only part of an invoice is corrected, create a partial credit note for the selected source lines and quantities. Invoice tracks already credited quantities and rejects an allocation that would exceed the remaining creditable quantity.

Follow Create or use a credit note for the concrete PHP APIs.

What not to do

Do not implement cancellation by:

  • deleting the Sylius invoice;
  • changing its number, issue date, totals or frozen buyer/seller data;
  • overwriting its persisted Factur-X/XML artefacts;
  • re-running generation after modifying mutable order data and expecting a different fiscal result.

Those approaches break the immutability contract described in Invoice data and Lifecycle.

Current integration boundary

In the supported version, cancellation is an accounting workflow expressed through credit-note services, not a dedicated Invoice Admin “Cancel” button, public endpoint or console command. Your application decides when a business event requires a full or partial credit note; Invoice provides the immutable source data, credit-note construction rules and compliance registration pipeline.