Apple Pay for Web
Configure Apple Pay for Web into your website to accept payments in Safari and supported third-party browsers on Apple devices.
Key capabilities
Cross-browser support
Accept Apple Pay payments using supported browsers on secure devices.
Process Apple Pay payments in Chrome or Edge when customers use an iPhone.
Use a consistent implementation across supported browsers, including Safari.
iFrame support
Support iFrame-based checkout experiences.
Allow embedded payment flows, including Paylink and Hosted Payments.
Enforce domain validation and browser/device compatibility requirements.
Prerequisites
Make sure you have the following before you configure Apple Pay and start accepting payments on your website:
Devices compatible with Apple Pay.
HTTPS enabled for both development and production environments.
A valid SSL certificate for your domain.
Transport Layer Security (TLS) 1.2 or later and a supported cipher suite for your server.
Ensure Apple Pay is configured and enabled on your production server.
We recommend you implement manual card entry using the JavaScript as a fallback.
Supported payment methods
Payment and address information are required to process payments using Apple Pay on your website.
Supported Cards
Merchant Capabilities
Unsupported payment methods
In-App payments
Recurring payments
Split shipment
Voids/Refunds through Apple Pay
Getting started
Xplor Pay manages the Merchant Validation process for you by creating an Apple Merchant ID and CSR. For more information, see Apple Developer Documentation.
Register domain using Merchant Portal
To register a domain:
Go to the Merchant Portal.
Select Virtual Terminal > VT Settings > Apple Pay for Web.
Download the registration file.
Host the downloaded file on your website to complete the registration.
Register domain using Apple Pay for Web API endpoint
To register a domain:
Use the POST method with Apple Pay for Web API endpoint to register the domain or domains you’ll use with Apple Pay.
Host the verification file provided by Xplor Pay to you on the following URL, replacing
[DOMAIN_NAME]with your domain name.
URL: https://[DOMAIN_NAME]/.well-known/apple-developer-merchantid-domain-association
The URL with your [DOMAIN_NAME] must be publicly accessible to allow Apple to verify the file.
Verifying domain with Apple
To verify your domain with Apple:
Send a notification to Xplor Pay to request domain verification with Apple after hosting the file at the appropriate URL.
You will receive confirmation after successful domain verification with Apple from Xplor Pay.
Configuring Apple Pay for Web
To configure Apple Pay into your website:
Add the
JavaScriptSDK.initmethod to allow Apple Pay.
The following table describes the fields in the JavaScriptSDK.init method:
pk
String
Required
Your public API key issued by Xplor Pay to authenticate the SDK.
enableApplePay
Boolean
Required
Enables Apple Pay functionality when you set it to true.
Add the
applePayRequestobject to theJavaScriptSDK.initmethod.
The following table describes the fields in the applePayRequest object:
applePayRequest.total
String
Required
Defines the total transaction amount and merchant label that appear in the Apple Pay sheet.
total.label
String
Required
The merchant’s name displayed to customers in the Apple Pay sheet. For example, Bob’s Canoes.
total.amount
String
Required
The total transaction amount to be charged. For example, 50.25
total.type
String
Required
Indicates the type of transaction amount. Use final for a fixed total.
See the Apple Pay on the Web Demo for additional objects you can use in your Apple Pay payment sheet.
Processing payments with Apple Pay
Integrating the JavaScript handles Apple Pay token and convert it into the mobile JSON Web Token (JWT).
To process the payment with Apple Pay:
Add the
ClearentTokenSuccessandClearentTokenErrorfunctions to your integration to receive feedback containing the mobile JSON Web Token (JWT) for processing payments.
Make sure the ClearentTokenSuccess and ClearentTokenError functions are added to your JavaScript integration to avoid unnecessary rework. If you haven’t integrated them yet, see the JavaScript SDK for integration steps.
Use HTTPS methods to send the mobile payment API requests using the mobile JSON Web Token (JWT) from your server.
Make sure you have the following to process the Apple Pay transaction using Mobile Payment Transactions API on your website:
✅ API key issued by Xplor Pay
✅ Mobile JSON Web Token (JWT)
Don’t expose the API key issued by Xplor Pay in your website code or client-side scripts.
Testing Apple Pay for Web
Refer the Apple’s sandbox testing guide to test offline transactions on your website using Apple Pay.
Last updated
Was this helpful?

