#Topher-Apple-Pay
1 messages · Page 1 of 1 (latest)
Hi 👋 yes, you're correct, you will need to register the domains where Elements will be rendered in order for Apple Pay to be presented.
The type of Connect scenario that you're using is going to influence exactly what you need to. Are you using Direct or Destination charges?
Destination charges
Gotcha, so for Destination charges your platform is going to need to register all of the necessary domains on your platform account. You can use the code snippet shown in this section of our docs to see how to register domains programatically:
https://stripe.com/docs/stripe-js/elements/payment-request-button?html-or-react=html#verifying-your-domain-with-apple-pay
(The doc is for a Payment Request Button implementation, but the Apple Pay domain registration process works for other integrations as well)
So this can mostly be done on the fly? Just call the api endpoint ApplePayDomain:create?
Yup, that'll trigger the registration/verification flow and as long as you have the domain association file added to the site at the right location (discussed more in Step 1 in that section) then the domain should be added.
Perfect
Custom domains wouldn't work like this though right?
Since a custom domain won't have the verification file. Example custom domain..... clients.topherphoto.com.
Since you're controlling the sites, would you be able to post the verification file so it would be returned via the custom domain?
I'm not sure. I'll have my team explore that. Thank you!
Gotcha, without that verification file present you won't be able to successfully register the domain with Apple, so yeah I would recommend that you look for a way to be able to serve the domain association file from the custom domains.
Happy to help!