So it sounds like you did create 2 accounts, one was the original @icloud.com account and then a new one with @gmail.com as the email.
You can only sync if they are the same account, if this is the case you could have added your @gmail.com address as a secondary email on your main account but now that it's created as a new account you may need to chose what one is going to be your new account and sign out of the other.
If it's in fact the same account and one was logged in recently and one is a older login session and they are both domains of the same account logout of the one and login again.
Post
Replies
Boosts
Views
Activity
If this is your app you would create a in-app purchase item and it will use the card info for the account on file when the user buys the in-app purchase. If this is in fact a website and not an app in the App Store you would use a external payment processor like Stripe and setup your account to accept Apple Pay as a payment method.
You can also use the PassKit API.
To open a payment button: https://developer.apple.com/documentation/passkit/pkpaymentbutton
To interact with passes: https://developer.apple.com/documentation/passkit/pkpasslibrary
For in-app purchases Apple has an entire page for this.
https://developer.apple.com/in-app-purchase/
You have a few options, one is to use a proxy on the domain level. If you are using CloudFlare for the domain you can setup a service worker to rewrite the response of the URL (requires some work to setup and code).
You can also message Shopify and see if they have any direct ways to manage this, they do with payment processors like the built in Shopify one (Accelerated checkouts) and Stripe. If you do a quick search you can find the support article on Shopify about Apple Pay setup.