Write an article based on this summary:

Make sure you have a gift card. Open the iTunes Store. Scroll all the way down and tap Redeem. Enter your Apple ID password. Tap You can also enter your code manually. Type in your gift card's code. Tap Redeem. Purchase a song.
If someone gave you a gift card that you want to use for your iTunes purchases, you can enter its code into your iPhone in order to apply it to your next purchases.  iTunes gift cards take precedent over your normal payment method, so any purchases made after entering your gift card code will use your gift card (until you've used up your gift card). You will need to scratch the foil off of the back of your gift card before you can view its code. Tap the iTunes Store app, which resembles a white star on a pink background. It's at the very bottom of the screen. When prompted, type in the password you use to log into your Apple ID account, then tap Sign In. It's in the middle of the screen. Using the on-screen keyboard, enter the code that's on the back of your gift card. It's in the top-right corner of the screen. As long as the gift card's balance is sufficient, any song you purchase will use your gift card's balance rather than using a credit or debit card:  Tap Search, then tap the search bar at the top of the screen. Type in a song's name. Tap the price of the song. Scan your Touch ID or enter your Apple ID password when prompted.