Please follow the steps below:
On PC
On a computer, go to “Redeem Code” and click “Sign In”.
Sign in with your Microsoft account.
Click “Redeem”.
Enter the 25-character prepaid code and click “Confirm”.
On Xbox One
Go to “Games”, and then select “Use a code”. Or, say “Xbox, use code”.
If prompted, sign in.
Enter the 25-character code.
On Xbox 360
Sign in to Xbox Live using the account for which you want to use the prepaid code.
Press the “Guide” button on the controller.
Go to “Games & Apps” and select “Redeem Code”.
Enter the 25-character prepaid code and select “Done”.
When prompted, click “Yes” to confirm the redemption.