Requires payments:write, a reason and an Idempotency-Key, and payment records switched on for the environment (else 503). Voids an open client invoice that has nothing left on it: every payment record on it refunded in full, and no credit note. Nothing is refunded and no payment is deleted. An invoice that still has a payment on it, or is not open (already paid or void), answers 409 balance_conflict: record the refund first. 422 unsupported_configuration means the practice or the invoice cannot be voided through the API: the practice has a live Xero or Healthcode connection, an Effra integration, or webhooks on invoices, payments, payment sources or payment lines; the invoice has a credit note or is linked to Xero or an insurer claim; or the key's account holds a membership of a team role that no longer exists. Staff can still void such an invoice in the web app. Repeating a request with the same Idempotency-Key and body answers 200 with replayed true.
| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
400Invalid reason, identifier or Idempotency-Key.
403Current account authority refused.
404Invoice or linked graph not accessible.
409A payment is still on the invoice or it is not open (balance_conflict), or the Idempotency-Key was used with another request.
422The practice or the invoice cannot be voided through the API (unsupported_configuration): see the description.
503Payment records are not switched on for the environment, or the invoice is being written by another request: retry.
