Apple Pay
Set up Apple Pay on the web with Vortex using PRTH-managed validation.
Apple Pay is a digital payment solution that allows customers to maake secure and convenient transactions using their Apple devices. By adding Apple Pay to your web page, you can offer your customers a faster and easier way to pay online, without requiring them to enter their card details or shipping information. Apple Pay also reduces the exposure of sensitive payment data to your system, as the payment information is encrypted and tokenized by Apple.
Common use cases include:
- E-commerce Checkout: Customers authenticate with Face ID or Touch ID — no card entry required.
- Device-Bound Network Tokenization (DPAN): Each transaction generates a device-specific token, keeping raw card data off your servers.
- SCA-Compliant Transactions: Biometric authentication satisfies SCA requirements, bypassing 3DS challenges on eligible transactions.
- Dynamic Surcharge: Surcharge amounts are applied dynamically and presented on the Apple Pay payment sheet before authentication.
How it Works
Setting up Apple Pay involves hosting a domain association file on your server and registering your domain.
Step 1: Setting Up Domain Association for Apple Pay
PRTH handles Apple Pay’s merchant validation on behalf of merchants using Vortex. This includes creating an Apple Merchant ID and the necessary Certificate Signing Request. Instead of following the manual merchant validation process outlined in Apple’s documentation, you can use these steps:
Steps for Domain Association Download the domain association file:
PRTH provides a pre-configured domain association file to simplify your setup. Download this file and host it on your website’s server at the following path:
/.well-known/apple-developer-merchantid-domain-association
For example, if your domain is https://yourwebsite.com, the file must be accessible at:
https://yourwebsite.com/.well-known/apple-developer-merchantid-domain-association
Register your domain with PRTH:
After hosting the domain association file, notify PRTH to register your domain with Apple. You can do this through the PRTH Dashboard under Payment Methods - Domain Registration, or by using the API with your live credentials as shown below.
Example Command Line Registration:
curl --request POST \
--url 'https://sandbox.api.mxmerchant.com/checkout/v3/applepay/register' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '{
"merchantId": 1000003276,
"domainNames": ["[email protected]", "[email protected]", "[email protected]"],
"merchantName": "Display Merchant",
"merchantUrl": "https://your-merchant-url-to-be-registered"
}'Important — Register your domain only once per PRTH account to avoid duplication.
Begin Apple Pay Transactions:
Once PRTH registers your domain with Apple, you can start accepting Apple Pay payments using your live API keys. No further action is needed on your end for merchant validation.
Why are these steps Important?
By following these steps, PRTH manages the Apple Pay merchant validation process for you. This setup ensures that your domain is fully validated and ready to process Apple Pay transactions.
Best Practices
| Practice | Description |
|---|---|
| Host the domain association file correctly | Serve the file at /.well-known/apple-developer-merchantid-domain-association with Content-Type: text/plain and HTTP 200. Redirects or HTML wrappers will cause validation to fail. |
| Serve your checkout over HTTPS | Apple Pay will not initialise on HTTP pages. A valid TLS certificate is required before testing or going live. |
| Pass the complete encrypted token | Submit the full token in cardAccount.mobileWallet.encryptedPayload. Incomplete tokens cause decryption failures. |
| Never reuse an Apple Pay token | Each token contains a one-time cryptogram. Resubmitting a token results in a declined authorization. |
Updated about 6 hours ago