The error indicates the gift card or code was bought for a different country/region than the one set on the Microsoft account being used to redeem it. Gift cards and codes are region-locked and must match the region of the Microsoft account.
To resolve this:
- Verify that the Microsoft account country/region matches the country/region where the card was purchased.
- If the card was purchased for the wrong region, contact the retailer to request a refund or an exchange for a card that matches the Microsoft account region. Microsoft support cannot change the region of a gift card or convert it to another region.
- After obtaining a correct-region card, redeem it by going to Redeem Code, signing in with the Microsoft account, and entering the code.
Once redeemed successfully, the balance is added to the Microsoft account and can be used in Microsoft Store online, on Windows, or on Xbox, subject to local restrictions (for example, gift cards cannot be used to buy hardware in Taiwan).
References: