Apple Pay is a fast, easy, and secure way to pay that’s accepted by over 85% of retailers in the U.S. Apple Pay replaces the need for your customers to take a physical card or type in personal information during the sales process.
Apple Pay functionality is built into our existing platform and requires little-to-no development work, with three easy integration options:
These options include everything you need to directly implement the Apple Pay solution into a checkout flow for a fully customizable customer experience.
Note: Cardholders must have a credit or debit card set up in their mobile Apple Wallet to use Apple Pay.
Compatible browsers and devices
Apple Pay is compatible with the Safari browser and does not work with Microsoft Edge/IE or Google Chrome. We recommend downloading the latest version of Safari available, as noted below.
Safari on Mac running macOS Sierra or later
Mobile Safari on iOS 10.1 or later
Accepted Apple Device - Apple is compatible with iPhone, iPad or Mac, which have thumbprint or facial recognition capabilities.
Safari supports Apple Javascript libraries (which are native to the Safari browser) so Apple Pay is not available in other web browsers.
Domain whitelisting means to provide your web domain (www.exampledomain.com), not including https:// to Apple in order to authorize server calls from Apple's Apple Pay service. Domain whitelisting is required for Apple to validate transactions being processed by the authorized entity. To provide this whitelisting capability, you'll be required to host a specific file on your website and make it accessible via a secure URL.
This file is used for domain verification by Apple Pay's service to ensure the legitimacy of your website. Here are the key requirements and steps to prepare your website and codebase before initiating the Apple Pay registration process.
Requirements for Apple Pay Registration:
Your website URL cannot be set to 'localhost,' as it needs to be publicly accessible.
Your website must have a valid SSL certificate, beginning with https, for secure communication.
This verification ensures that a website is eligible for Apple Pay integration, providing a secure payment experience for partners, merchants and their customers. To begin accepting Apple Pay, contact your service provider or self-register using the Portal to begin accepting payments:
Step 1: Navigate to Settings from the main Dashboard, under the Admin category. Then, click Payment Methods.
Step 2: On the Payment Methods page, click the START REGISTRATION button under the Apple Pay section.
Step 3: Click the Download link under “Download the File” to have the domain registration file downloaded.
Step 5: Return to the Portal Payment Methods page and click the APPLEPAY - REGISTER ALL button to complete the registration.
To confirm you configured correctly: Visit {baseURL}/.well-known/apple-developer-merchantid-domain-association to test if the file automatically downloads with the matching domain registration contents matching the original file downloaded from the Portal.
Result
Once the requirements have been met and you’ve initiated the registration process, the following system actions will occur:
The registration process will search your website for a specific URL path: /.well-known/apple-developer-merchantid-domain-association.
Once found, the registration file is downloaded from this URL. This is the file that is being stored in the codebase, previously downloaded from Payrix.
Apple Pay will then compare the downloaded file from your website to the reference copy it has on record from Payrix
If the files match, Apple Pay will instantly verify your domain, a process that usually takes no more than several seconds.
Apple Pay Domain Validation and Enablement Verification
To validate that the Merchant domain has been properly verified and that Apple Pay is enabled for that Merchant, you can run the following API call:
Request Headers and URL:
POST /applePayValidation/{id} HTTP/1.1
Content-Type: application/json
Host: api-test.payrix.com
APIKEY:{{private_api_key}}
Path Parameter:
Parameter
Description
Parameter
Description
{id}
The Merchant ID for the Merchant validating their domain has been verified by the Apple Pay service.
When enabling Apple Pay, the payment options will automatically display within the PayFrame without requiring additional integration work.
For additional guidance, set up your PayFrame inside the sandbox view so you can preview how to embed the button inside the frame.
To test, use this code snippet to create a test PayFrame and replace it with your own API Key and desired Merchant ID when creating your finalized PayFrame:
Example PayFrame Setup
Setup PayFields for Apple Pay
For clients using PayFields, there is a simple and easy solution to add the Apple Pay payment option to your checkout flow.
PayFields will allow your customers to select to input their card information or utilize Apple Pay at the point of sale.
Step 3: Add the Apple Pay JavaScript within the <head> tag.
Step 3B: Add the Apple Pay button within the <body> tag.
Step 4: Style the button with the following CSS properties or adjust as desired.
Step 5: Test the button and confirm the transaction is successful in your Merchant’s Portal or using the API.
Example PayField Code
Standalone Apple Pay Button
To provide you with greater control of the checkout experience for your merchants, we offer a “standalone” Apple Pay button option. This solution allows you to implement Apple Pay into your existing PayField integration and strip away all other PayField elements except for the Apple Pay button (for supported browsers).
After you complete the registration and whitelisting process with Apple, you can build your custom Apple Pay solution:
Step 1: Create a PayField and add the standalone button
Step 2: Add the Apple Pay button using the code below in your <body> tag:
This will style the button as shown in the example below, then can be implemented and customized to match your checkout flow.
Note: The <script> cdn for Apple Pay SDKs must be placed in the <body> tag, and not <head>.
Step 3: Style the button.
Note: You can also use these parameters in a separately linked package CSS file.
Step 4: Test your solution and confirm you are able to create a successful Apple Pay transaction. If you are having trouble, please contact customer support.