Hello _144,
I am Jaspreet Singh.
Child accounts can make purchases using gift cards or money in their account as per microsoft here :
Quote : Purchases can still be made from a child account using gift cards or money in their Microsoft account
https://support.xbox.com/en-US/help/subscriptio...
Have you tried redeeming the code in your account directly via here : https://account.microsoft.com/billing/redeem?re...
Make sure in the top right hand side it is your account before you begin the redemption.