The VeriFactu status webhook says whether it reports the registration or the cancellation
verifactu.status.updated now carries operation: REGISTRATION or VOID. AEAT's answer to a cancellation reaches you by webhook without a lookup.
verifactu.status.updated was already sent when the cancellation record of a voided invoice changed status, but its payload did not say which record it was reporting on: to know whether AEAT had accepted a cancellation you had to match verifactu_registration_id against the invoice's VeriFactu records.
The payload now includes operation, with the same values as the operation of those records: REGISTRATION for the invoice's registration and VOID for its cancellation.
What else changed
operation: VOIDwithnew_status: VOIDEDis AEAT accepting the cancellation. WithREJECTED,error_codeanderror_messageexplain why.- A corrected registration is still
REGISTRATION. It replaces the invoice's registration, it does not cancel it. - The field is new and always present; nothing else in the payload changes, so existing handlers keep working.
Where to go next
Simplified invoice exchanges are recorded with VeriFactu
With VeriFactu, exchanging simplified invoices now issues the full invoice and records it as `F3`. `SIMPLIFIED_EXCHANGE_NOT_RECORDABLE` now only means a simplified invoice issued without VeriFactu.
Corrective invoices and voids follow the rules of the law
A corrective can no longer rectify more than was invoiced, has a deadline, and can fix the recipient's data; a sent or paid invoice is voided only if issued in error.