Void an invoice by issuing a credit note

post
https://api.wafeq.com/ae/v1/invoices/{invoice_id}/void

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.

A new commercial credit note (81) cannot contain zero-rated (Z) lines,
document discounts or charges, including when the seller has no TRN.
Every line, document discount and charge of a new 81 must be exempt (E) or
out of scope (O). An older 480 with 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.

The credit note copies the invoice's buyer. If official validation no longer
accepts its address, for example a UAE address without an emirate code from
3 December 2026, issue the credit note with POST /credit-notes,
previous_document_id and the corrected address instead.

Path Params
stringrequired
Body Params

Optional body for voiding an invoice.

string | null

Why the invoice is voided, in words. Added to the credit note's notes.

string | null

The credit note's reason code, as in POST /credit-notes. Defaults to DL8.61.1.A.

Headers
string | null

Makes the send safe to repeat: send the same body with the same key again and you get the first answer back, and nothing is sent twice. Use one key per version of the document; a changed body needs a new key. Required for a document reported to the FTA only, for queued delivery (Prefer: respond-async) and with corrects_document_id, so send one every time. Keys are scoped to the taxpayer and your organization, and never expire.

string | null
stringrequired

Taxpayer ID (txpay_…). Required with an organization API key (pk_…) for this taxpayer-specific operation, even for one taxpayer. Not a TIN. Optional with a taxpayer access token, which already names its taxpayer.

string | null

Grant ID (tgr_…) to act through, with an organization API key. The request then has exactly that grant's scopes and fails once the grant is revoked. Without it, the key acts through all of the organization's active grants on the taxpayer.

Response