Sorry, but paying for non Apple Services or content can't be done by using an Apple Gift Card:
What you can buy with your Apple Gift Card or Apple Account balance - Apple Support
And, to be able to use your iPhone for public transport, you will need an iPhone 8 or newer:
Use Suica, PASMO, or ICOCA cards on iPhone or Apple Watch in Japan - Apple Support
You will have to add your credit card to Apple Wallet, to be able to pay for that, Apple Gift Cards can't be used.
And Apple Gift Cards can only be redeemed for that country, for which your Apple ID is registered. Your Apple ID would have to be registered in Japan, in order to be able to redeem an Apple Gift Card bought in Japan.