A credit note is considered a negative invoice. In the same way that payments are applied to close out an invoice balance, refunds are issued to close out a credit note balance.
https://support.dearsystems.com/support/solutions/articles/11000034630-customer-credit-notes-and-refunds-