You can redeem all types of prepaid codes, including Microsoft gift cards and Xbox Live Gold subscription cards, on your Xbox One console and use them immediately. To do so, follow these steps:

Make sure you are signed into the Microsoft account for which you want to redeem the code.

From the Home screen, scroll right to Store.

Select Use a code.

Use the onscreen keyboard to enter your 25-character code on the Redeem your code or gift card screen, and then select Next to finalize your redemption. Don’t worry about hyphens, the system takes care of those for you.