Months, not money
Where the product is a prepaid period, the recipient redeems it and their subscription extends by that many months. No credit sitting unused, no arguing about whether the balance can reach the billing.
That is the version to ask for when it exists in the market you need.
The app store problem still exists
If the recipient subscribed through a phone or tablet app store, that platform bills them — and a code from the service often cannot apply to a subscription billed elsewhere.
The fix is the same as always: have them look at their account's billing section. If it names a platform rather than showing a card, buy that platform's credit instead.
This is the single most common reason a music gift fails to work.
Family and Duo plans
These cost more per month than an individual plan, so a code worth three months of individual covers fewer months of family.
More awkwardly, a family plan is usually billed to the plan owner. Giving a code to a family member who is not the owner may leave them unable to apply it at all. Check who actually pays.
Free-tier recipients
Someone on the free tier is a good target for this gift — it is a real upgrade rather than a subsidy of something they already buy. It also means no billing complication, because there is nothing running yet.
Region
Market-specific. The code has to match the country the account is registered in.
Asking for one
Tell us the country, whether they already subscribe, and who bills them if they do. Related: gift cards for subscriptions and renewals and the music guide.