ApplePay integration with multiple providers

We have a checkout page on which clients can configure the providers we've integrated with for each currency.

One such provider is Stripe, with which we have already integrated ApplePay and host a merchant domain association file.

Now, we're getting requests to support ApplePay with other providers.

The issue is that we can't tell Apple to use a different path to domain association file for domain verification.

And, replacing the existing domain association file seems like a hack, since I believe it's needed for domain re-verification.

We're thinking of using subdomains for serving the domain association files for different providers.

But, we have some questions on how ApplePay domain verification works to understand how we can solve our problem.

Firstly, can we use subdomains for individual domain verification? If we already have example.com verified with Stripe, can we serve the domain association file for the other provider with provider.example.com and have the verification work?

Secondly, let's say our domain is example.com, and we can use provider.example.com to serve the domain association file and verify the domain. Then on example.com/checkout, will using an iframe with provider.example.com/applepay to host the ApplePay button work?

This thread suggests otherwise, but we want to confirm.

Lastly, is the only way to make an ApplePay payment for provider.example.com to use that subdomain? So redirecting to provider.example.com/applepay would work?

Thanks for your help!

Hi @paritoshcm,

You wrote:

Firstly, can we use subdomains for individual domain verification? If we already have example.com verified with Stripe, can we serve the domain association file for the other provider with provider.example.com and have the verification work?

Yes, you may use subdomains. However, they must be static domains (e.g. subdomain1.example.com, subdomain2.example.com) and cannot be dynamic/wildcard domains (e.g, subdomain*.example.com) due to domain ownership requirements for Apple Pay.

Next, you wrote:

Secondly, let's say our domain is example.com, and we can use provider.example.com to serve the domain association file and verify the domain. Then on example.com/checkout, will using an iframe with provider.example.com/applepay to host the ApplePay button work?

Please see the post below to learn more about the best practices when integrating Apple Pay into an iframe:

Integrating Apple Pay into an HTML inline frame (iframe) on your website

https://developer.apple.com/forums/thread/777004

Basically, the parent page domain must be identical to the domain registered for the merchant in the Developer portal, and used in the request to generate a merchant session.

Then, you wrote:

Lastly, is the only way to make an ApplePay payment for provider.example.com to use that subdomain? So redirecting to provider.example.com/applepay would work?

Please see the following post to answer your questions about multiple providers:

Apple Pay Web and Ecommerce site hosting Multiple Merchants on a Single Domain Site

https://developer.apple.com/forums/thread/61538?answerId=829805022#829805022

If you are not using, or plan on requesting access to use the Apple Pay Merchant Registration API, the subdomain must be used throughout all of the merchant validation steps—domain registration, domain verification, and merchant session validation.

Cheers,

Paris X Pinkney |  WWDR | DTS Engineer

ApplePay integration with multiple providers
 
 
Q