Processes in Microsoft 365 for setting up Office apps, redeeming product keys, and activating licenses.
Hi there!
Did you purchase the gift code from the Microsoft/Xbox store itself? If it is on the Microsoft/Xbox Store and the option for refund is not showing on your order history page, I suggest you visit the Microsoft support page below and sign in to your account for refund: https://support.microsoft.com/en-us/accounts-billing/subscriptions/get-a-refund-for-apps-and-games-purchased-from-microsoft-store
On the page, click the "Request a refund for digital games" and follow the prompt to request a refund to Microsoft.
I hope the above helps. Please note that I am merely a fellow user like you trying to provide insight and information that may be helpful to others.