Selling or given gift cards is a common practice for some businesses.
A gift card is managed mostly like a deposit but not linked to a party but to a gift card ID.
A gift card can be sold but also created by the user (for free).
The result of a sale complain could be a gift card.
On product, we add a checkbox to make it a gift card for types service or goods.
On processing the sale, for each line with a product gift card we create a gift card instance with a unique ID (if it is configured). The ID comes from a sequence configured on the product configuration per companies. The gift card instance stores also the amount in currency of the sale line (without taxes) and the sale line as origin. If the product is a goods, we link to the stock move the card instance. A number must be required on the instance to do the move.
To consume a gift card, we add a One2Many on the sale order (like the coupon) but only for the same currency and company. A gift card can be added only to one sale.
On quotation a return line for each card is added which reduce the amount to pay.