Yes, I've had the hotel refund a deposit so I could apply a gift card. It's never been a problem for me, but just to be sure, I've always first sent an e-mail asking them if they would do that. That way I would have something with me at the hotel when asking them to process the refund. You will probably have to do all of this at the time of check-out, so be sure you're not in a rush when trying to leave, since it may take a bit to process everything.