Customer value
Account credit wallet
Keep goodwill and refund-to-credit value in a separate ledger, then safely apply available credit to a booking balance.
Accounting boundary: account credit is not treated as a card/cash capture. It has its own credit/debit ledger and is applied as a tender against the amount due.