#Topher-Apple-Pay

1 messages · Page 1 of 1 (latest)

cinder spoke
#

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?

jovial ore
#

Destination charges

cinder spoke
#

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)

Collect payment and address information from customers who use Apple Pay, Google Pay, and browser-saved cards with Payment Request APIs such as Microsoft Pay on Edge.

jovial ore
#

So this can mostly be done on the fly? Just call the api endpoint ApplePayDomain:create?

cinder spoke
#

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.

jovial ore
#

Perfect

#

Custom domains wouldn't work like this though right?

cinder spoke
#

Since you're controlling the sites, would you be able to post the verification file so it would be returned via the custom domain?

jovial ore
#

I'm not sure. I'll have my team explore that. Thank you!

cinder spoke
#

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!