Send a credit note, which reduces or cancels an invoice, and report it to the FTA.
A credit note takes the same journey as an invoice (see POST /invoices):
Wafeq checks it, delivers it to the buyer's e-invoicing provider or reports it
to the FTA only, and reports it to the FTA. Wafeq files it as a tax credit note
(381) or a commercial credit note (81).
Say which invoice it credits. For an invoice sent through Wafeq, send its
document_id in previous_document_id. For one issued elsewhere, set
previous_invoice_source to external and send its number, and its issue date
if you have it; keep the original's records in your own system. A volume
discount (credit_note_reason_code VD) credits no single invoice. To cancel an
invoice in full, POST /invoices/{invoice_id}/void builds the credit note for you.
Live mode needs an active subscription for your organization: without one you
get 402 (subscription_required). If Wafeq can't confirm the billing status
just then, you get 503 (billing_status_unavailable): try again shortly.
Sandbox needs no subscription.
| 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.