Cancel an invoice in full by issuing a credit note for its whole amount.
invoice_id in the path is the invoice's document_id. Wafeq builds the credit
note from the original invoice, so you send no lines or parties, and gives it a
number of its own. It's a normal credit note, sent and reported to the FTA like
any other: a tax credit note (381) for a tax invoice, or a commercial credit
note (81) for a commercial invoice, or a self-billed credit note (261) for a
self-billed invoice (389). The invoice then shows its number in
credited_by_invoice_number.
For a VAT-registered seller, a new commercial credit note (81) requires every
line, document discount and charge to be out of scope (O). An older 480 with
exempt or zero-rated supplies cannot be voided through a new 81; it is refused
with document_type_mismatch, and the original remains unchanged.
Send Idempotency-Key to retry safely: the same void body and key return the
first response, even after the invoice shows as credited. It is required for
a reporting-only original. Such a void preserves the original buyer and
reporting-only route and returns 202 reporting_only; nothing is delivered
to the buyer. In Sandbox, reporting stays simulated.
Refused with 409 when the invoice is already credited, and with
409 delivery_unsettled while its delivery to the buyer is still in progress.
A credit note can't be voided.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
409Conflict; detail.code says which. idempotency_key_reused: the key was used before with a different body; use a new key for a changed document. idempotency_in_progress or idempotency_unconfirmed: an earlier send with this key hasn't settled yet; wait, then send the same body with the same key. document_already_submitted: a document with this number was already accepted; follow it instead of sending it again. correction_not_ready: Wafeq is still handling the rejected document's report to the FTA; send the same correction again later, with the same key.
503A temporary problem, e.g. the buyer couldn't be looked up on Peppol just now (smp_unavailable), the billing status couldn't be confirmed (billing_status_unavailable), or the send couldn't be saved (idempotency_unavailable). Send it again later with the same Idempotency-Key, never a new one, so it can't be sent twice. queued_delivery_unavailable means new queued delivery is unavailable (for example, disabled): submit without Prefer: respond-async, or retry once queued delivery is enabled. A key already reserved for queued delivery keeps that delivery mode; completed keys still replay.