Cancelling an invoice in Verifactu: example
Cancellation is for invoices issued by mistake, not invoices with mistakes: those are fixed with a corrective invoice. It is done with /verifactu/cancel.
| Field | Value |
|---|---|
| API | Verifactu API |
| Invoice type or key | /verifactu/cancel |
| Endpoint | /verifactu/cancel |
| When to use it | Cancel an invoice issued by mistake. |
What changes in this case
A previously sent registration record that is no longer valid will be cancelled by means of a cancellation invoicing record identifying the number of the original invoice. This can be done using the endpoint /verifactu/cancel.
It is important to understand that cancellation should not be used to cancel invoices issued with errors, but rather for invoices issued by mistake. If an invoice has been issued with an error that needs to be corrected, a new corrective invoice must be issued that references the original invoice.
If an invoice has been issued by mistake, it can be cancelled using a JSON like the one shown below.
JSON request
{
"serie": "A",
"numero": "1",
"fecha_expedicion": "25-02-2025"
}In the event that a new correct invoice needs to be issued, it must be registered with a new record using a different invoice number or issuance date.
If the registration was rejected or never reached the AEAT, /verifactu/cancel accepts rechazo_previo and sin_registro_previo: see the documentation.
Try this case in the test environment
Create your free account, copy the request and send it with the test API key of your test NIF.