Short answer
HubSpot's KB: you can't void invoices with payments made against them; refund the payment instead. A credit memo is associated with an invoice when you apply it. Invoices tied to a credit memo, online payment or subscription can't be deleted; with a manual payment, delete the payment first.
1. Payments
Payment setup in my demo portal.

2. Templates
See invoice presets.
3. Related
Xero.