You need to buy cards from the same country to which your Apple ID is set. If your 'Code must be redeemed in a different country or region' (storefront), click here --> https://support.apple.com/HT201195#differentcountry
The payment method for Family Sharing is automatic:
1. If anybody in the family buys or subscribes to something, Apple first attempts to charge the item to that individual's Apple Account (Apple ID) balance, if any.
2. If a family member does not have enough personal Apple Account balance, any excess will be charged to the Family Organizer's primary payment method (usually a card of some kind). The Organizer's personal balance will not be used for purchases made by other family members. If it cannot bill the primary payment method, the Organizer will need to make another payment method the primary method.
- "Some purchases, including gifts, can't be billed to Apple ID balance and will be charged to the family organizer's payment method." "Some subscriptions might not be charged to Apple ID balance."
Ref:
- Family purchases and payments - https://support.apple.com/HT201079
- How App Store and iTunes Store purchases are billed - https://support.apple.com/HT201359
- Check your Apple ID balance - https://support.apple.com/HT202359
- Change, add, or remove Apple ID payment methods - https://support.apple.com/HT201266