Skip to main content

Apple Pay Details

Adding Apple Pay to your website requires a few steps. This guide will walk you through the process of setting up Apple Pay on your website.

Required Steps

  1. Verify your domain with Apple
  2. Add the Apple Pay button to your website Payment Element
  3. Create a Payment Request Create Payment

Step 1: Verify your domain with Apple

Apple requires every domain that a merchant uses to accept Apple Pay to be verified. This is done by adding a file to your website that Apple can use to verify that you own the domain.

The file must be named apple-developer-merchantid-domain-association and contain specific content.

In order to verify the domain you need to host this file at the location https://yourdomain.com/.well-known/apple-developer-merchantid-domain-association.

Contact your representative to get a copy of the file contents when you are ready to host this file.

Step 2: Add the Apple Pay button to your website

To add the Apple Pay button to your website, you will need to use the Payment Element SDK.

The Payment Element SDK is a JavaScript library that allows you to add a payment form to your website with minimal effort.

Once you have your domain verified with Apple, you can add the Apple Pay button to your website by following the instructions in the Payment Element SDK guide.

Step 3: Create a Payment Request

The Payment Element SDK will handle the creation of Payment Method for you. You will need to follow the normal process of creating a Payment Request to satisfy the Payment Intent you created for you payment.

Detailed Information on Apple Pay

Adding Apple Pay to a website requires many steps. They are outlined below.

  1. Create a merchant ID in the Apple Developer portal - this is a object that represents a collection of certificates, keys and domains.
  2. Create a Payment Processing Certificate - this is used to encrypt/decrypt the payment data and is a property on the Merchant ID
  3. Create a Merchant Identity Certificate - this is used to create Apple Pay session in the browser which is ultimately used to create the payment token
  4. Create a domain verification file - this is used to verify that you own the domain that you are adding Apple Pay to. Each merchant id can contain up to 99 domains.
  5. Add the Apple Pay button to your website - Apple Pay Button

The Forward Platform handles all of the above steps for you. You only need to provide the domain that you want to add Apple Pay to and then host the verification file at the location specified above.