According to: If you can't redeem your App Store & iTunes Gift Card, Apple Music Gift Card, or content code - Apple Support
"Card or code is inactive
If you see a message that your card is inactive, it might not have been properly activated. The best option is to go back to the retailer where you purchased it and try to resolve it with them.
If you need more help, contact us."