Integrating Apple Pay via Stripe

#stripe #applepay #rootdirectory

I’m trying to add Apple Pay (through Stripe) to a client’s website. Apparently this requires “registering the domain with Apple Pay”, and the way you do that is to download a file Stripe provides and are then supposed to put it in a folder as such:

  1. Download this domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site. For example, if you’re registering https://example.com, make that file available at https://example.com/.well-known/apple-developer-merchantid-domain-association.

  2. Next, tell Stripe to register your domain with Apple. You can do this by either going to the Apple Pay tab in the Account Settings of your Dashboard, or by directly using the API with your live secret key as shown below. Note that we’ve redacted your live secret key here - head to your Dashboard and replace sk_live_•••••••••••••••••••••••• below with your live secret key. curl Ruby Python PHP Node Java

  3. Once you’re registered, you’ll be able to make payments on your site outside of the Apple Pay Sandbox using your live API keys.
    Since we don’t use an FTP server with Wix, I’m not sure what to do here. I chatted with Stripe online and he said:

For the domain association file, you have to save the file in a folder using the following directory on your server:
/.well-known/apple-developer-merchantid-domain-association
So you would have your root directory > .well-known folder > and then the file saved under that folder
You can find our documentation on this here:
https://stripe.com/d…cs/apple-pay/web/v2#going-live For the domain association file, you have to save the file in a folder using the following directory on your server:
/.well-known/apple-developer-merchantid-domain-association
So you would have your root directory > .well-known folder > and then the file saved under that folder
You can find our documentation on this here:
https://stripe.com/d…cs/apple-pay/web/v2#going-live

Which made things about clear as mud for me. I called Wix support and he said we can’t do Apple Pay. My thinking, though, is if we can do code, can’t we simply create an object the same way I did with my payment form? Is there any workaround regarding needing a folder to put this file in? Wondering if it would be as simple as adding some code to an iframe the way I did with Stripe’s .js elements? Stripe didn’t know, Wix didn’t either. Anyone here have some advice or words of wisdom to share? Any help is greatly appreciated! Thanks in advance!

2 Likes

There’s really no way to add a file into the root directory as Wix Code “sandboxes” the site and its directories. Therefore, the answer you got from Wix support was correct.

You should find out if Stripe has any other way to do this not all environments allow access to the root directory.

Thanks for the info, Yisrael. I feel with code I suddenly find myself… inept. Looking to expand my knowledge base, learning more code. Your input is much appreciated.

Let’s vote for Apple Pay integration: https://support.wix.com/en/article/request-using-apple-pay-as-a-payment-provider

All the best
Alex :slight_smile:

You can pay with Apple Pay using Stripe Checkout.

How? :slight_smile: Without coding?