The gift card issued to a customer can be refunded only before it has been redeemed. However, the payment processed through gift cards can only be refunded through cash. In order to understand the refund process, please read our Knowledge Base article
The refunded gift card will automatically be added back to your inventory with its status changed to "Inactive". However, if you don't want to add the gift card back to your inventory, please uncheck the box titled "Add back to inventory".