AI resources

Possible errors

Below are the most common errors when integrating Apple Pay, their causes, and how to resolve them.

Errors due to Apple requirements

ScenarioError messageApple requirements
Incompatible deviceApple Pay not available or the button does not appearDevices: iPhone or iPad with iOS 10.1 or later, Mac with macOS Sierra or later and Touch ID or Face ID.

Browser: Safari primarily; other browsers have limited support.

Configuration: Wallet configured with at least one valid card.
Unverified domainMerchant validation failed or Domain not verifiedThe domain must be registered and verified in the Apple Developer Portal.

The verification file .well-known/apple-developer-merchantid-domain-association must be accessible.

HTTPS is required; Apple Pay does not work over HTTP.
Invalid or expired certificatesMerchant validation failed or Certificate errorValid, non-expired Merchant Identity Certificate.

Payment Processing Certificate configured correctly.

Certificates must be associated with the correct Merchant ID.

Orders API errors

Apple Pay processes payments with the Orders API, so the errors returned when creating the order or the card token are the same as in Checkout API. Check the full list of codes, messages, and possible solutions in Possible errors of Checkout API.

Best practices and support

There are some standard guidelines that contribute to greater security and a better experience in your Apple Pay integration. Learn more about each of them below.

  • Never expose private keys in the frontend. Use the Access Token only in the backend and, in the frontend, use only the Public Key.
  • Always validate data in the backend before processing payments. Calculate the purchase amount on your server, without trusting the values sent by the frontend.
  • Make sure the domain where the Apple Pay button is displayed uses HTTPS. Apple requires this for the button to appear on the screen. To do this, install an SSL certificate on your site.
  • Consider device compatibility. The Apple Pay button is only displayed on compatible devices and browsers, such as Safari on iOS and macOS.
  • Offer alternative payment methods. Keep other options in your checkout so that all buyers can complete the purchase, including those who cannot use Apple Pay.

If you need help, see our Support section or Apple's official channels, such as Apple Developer Support for questions about certificates, or the Apple Pay documentation.