Configuration

To finish your configuration, you only need to complete the iCloud account and domain registration steps below.

Set up your iCloud accountAnchorIcon

When testing, you need to be logged into an iCloud account that corresponds to your environment. Testing in sandbox requires you to be logged into an iTunes Connect sandbox tester account, which you can create with an Apple Developer account. Similarly, you need to be logged into a production iCloud account when testing in production.

Specify an iconAnchorIcon

When using Apple Pay on the web, users see your site's apple-touch-icon, if present. Add an apple-touch-icon to your website if you do not already have one. Consult Apple's guidelines on configuring web applications for more information.

Register your domainAnchorIcon

To test and accept Apple Pay on the web, you need to register any domains you plan to use with Apple. You can do this through the Braintree Control Panel using the instructions below, or through the API using Apple Pay: Register Domain. Don't register your domain through the Apple Developer Portal. You also do not need to generate and upload a Payment Processing Certificate for Apple Pay on the web, because these transactions are processed using our shared certificate.

Register your sandbox domainAnchorIcon

Register your sandbox domain name in the Braintree Control Panel:

  1. Log into your sandbox Control Panel
  2. Click on the gear icon in the top right corner
  3. Click Account Settings from the drop-down menu
  4. Scroll to the Payment Methods section
  5. Next to Apple Pay, click the Options link
  6. Scroll to the Web Domains (Safari) section
  7. Click the +Add link to the right
  8. Enter your fully qualified sandbox domain name
    • The value you enter must match your fully qualified domain name exactly, including the www. if applicable
  9. Click the Agree & Add Domain button

Register your production domainAnchorIcon

Register your production domain name in the Braintree Control Panel:

  1. Log into your production Control Panel
  2. Click on the gear icon in the top right corner
  3. Click Processing from the drop-down menu
  4. Scroll to the Payment Methods section
  5. Next to Apple Pay, click the Options link
  6. Scroll to the Web Domains (Safari) section
  7. Click the +Add link to the right
  8. Enter your fully qualified production domain name
    • The value you enter must match your fully qualified domain name exactly, including the www. if applicable
  9. Download the domain association file and host it at /.well-known/apple-developer-merchantid-domain-association on your site
  10. Click Agree & Add Domain

When Apple verifies a domain, it makes a request to retrieve the domain verification file. Ensure that:

  • The file is not served with a 3xx status code. Apple does not support HTTP URL redirects for the domain association file.
  • This file is served over HTTPS 1.1.
  • Access to this file is not behind a firewall (see Apple documentation on allowing Apple IP addresses).
  • The HTTP response for this request returns this file as a binary object and not as HTML or plain text.