Apple Pay

Using Apple Pay with payment form components.

Configuration

In order to allow your customers to pay with Apple Pay™, you must first request that our Support team enables Apple Pay on your terminal.

Domain Verification

In addition to enabling Apple Pay on your account, Apple requires you to register the domain you plan to use with Apple Pay.

To do so, you need to host a specific domain association file on your domain, which Apple will periodically check for.

Download this domain association file and publish it to the domain on which you will be hosting your payment form, ensuring it is accessible to the public from the URL https://[DOMAIN_NAME]/.well-known/apple-developer-merchantid-domain-association

Once you have verified that the file is accessible at that URL, you are ready to request verification by Apple. Using your API key, submit a request to our API to register your domain. Let's assume your domain is your.domain.com:

POST /accounts/your-account-id/apple_pay
{
  domains: ["your.domain.com"]
}

When you submit the request, we will submit your domain to Apple for registration and they will attempt to download the domain association file.

You can register multiple domains, but each domain must serve the aforementioned domain association file.

Adding Wallets to your Form

Once you have verified your domain and we have enabled Apple Pay for you, we can build on the example previously discussed on ExactJS Payment Forms. You can enable wallets by passing wallets: true as part of the options when adding the card component to your page.

const components = exact.components({orderId: "the_order_id"});
components.addCard('cardElement', { wallets: true });

If your terminal is enabled for Apple Pay and Apple Pay is supported by the browser, the Apple Pay button will appear as part of the component, above the card details entry.

If your customer chooses to pay with Apple Pay, they are prompted to choose their payment details from their Apple wallet and we will then use those details to pay for your order.

As usual, you will receive the payment_id in return if the payment was successful.

Note

We do not support tokenization with Apple Pay, so even if you have set up your payment form to tokenize your customer's card details, if the customer chooses to use Apple Pay we will still only use their details to pay for the order. We do not tokenize the customer's Apple Pay details.

Finally, we recommend that you read the Apple Pay terms and conditions. These terms and conditions apply whenever the Apple Pay service is offered.