accidentally bought an Apple store card instead of an iTunes card.
1.
You can redeem that card, see How to redeem your Apple Gift Card or App Store & iTunes gift card
How to redeem your Apple Gift Card or App Store & iTunes gift card – Apple Support (UK)
When redeeming a gift card, the amount will be credited to your (1) Apple ID balance and (2) you need to set your Apple ID balance as your default payment.
(1)
See -> Check your Apple ID balance
Check your Apple ID balance – Apple Support (UK)
(2)
Change, add or remove Apple ID payment methods
Change, add or remove Apple ID payment methods – Apple Support (UK)
If you update your payment method or add funds to your Apple ID balance, It would take about 1 to 3 business days in order to process.
If you're still unable to update your payment method, Contact Apple Support.
2.
See this Apple article: If you can't redeem your Apple Gift Card or App Store & iTunes Gift Card
If you can't redeem your Apple Gift Card or App Store & iTunes Gift Card - Apple Support
check. ⤵️
Card is not valid
Card has already been redeemed
Card is not activated
Code is unreadable
Code must be redeemed in a different country or region
Contact Apple Support -> Contact Apple Support.
Click here for more support and assistance.