I bought an iTunes gift card that was worth 15 dollars. When I got back home, I tried activating the code, but it said my code needed to be activated. When I looked at my receipt, I found out that it said " item will be activated within 24 hours". Do I have to wait for 24 hours and then try the code, or should I contact Apple and see if I can get the matter resolved that way?
The card will most likely become active within 24 hours, as mentioned in the receipt.
Apple offers sales support at 1-800-MY-APPLE and also around the globe in many local sales numbers.
You could always grab your receipt or gift card number and give a call to a person to check on the transaction and that it's correct if you aren't past the 24 hours. Absolutely call without hesitation if it's past the time and you still can't use your purchase.