Delete an unpaid invoice so it can no longer be paid: its payment page stops opening.
The invoice is not removed. It keeps its status (for example Unpaid), gets deleted: true, and still appears in Get an invoice and List invoices. Check deleted when you list invoices.
To give money back for a paid invoice, use Refund an invoice.