For a terminated transaction that was already registered in SIGN ES but was not carried out, and the invoice was not given to the customer a cancellation should be applied via the SIGN ES API functionality updateInvoice
, as stated in the Spanish invoicing regulation (Royal Decree 1619/2012, of November 30)
By performing a cancellation, the state of an invoice is changed and a new synchronization to the tax authority is started, in order to cancel the already registered invoice. Once an invoice is cancelled, the same number and series number can’t be used again.