Gift cards or Patient credit

I use gifts cards and also have patients who pay large sums of money once a year, and then we use that money towards services or office visits as credits. 

Or if patient needs a refund, is there an option to keep that money on their account as credit?

How do I set that up? 

How do I keep track of the balance on the gift cards or credits?