Apple Pay Integration: From Verification to Tokens
We integrate Apple Pay for your website, handling everything from domain verification to token processing. A 404 error on the verification file is a common reason why the service doesn't appear on your site—but we solve that in an hour. In one e-commerce project, after implementing Apple Pay, conversion increased by 15% in a month, and the average order value grew by 8%. Customers started paying for expensive items more often. Conversion grows by 10–20% by reducing checkout friction. We integrate with any payment gateway: Stripe, CloudPayments, Tinkoff, Sberbank. Contact us to evaluate your project—we will select the optimal gateway and calculate the budget.
How Apple Pay Boosts Conversion?
Apple Pay cuts checkout time to 10 seconds. Users don't need to enter card details or addresses—everything is pulled from Wallet. Based on our data, mobile conversion increases by 12–18%, and cart abandonment drops by 25%. This is especially noticeable with high-value items: customers are less likely to change their minds when payment is one tap away. Additionally, average order value rises by 8%, and overall revenue can see a 15% uplift. For a store with $50,000 monthly revenue, that means an extra $7,500 per month.
Technical Requirements and Domain Verification
Basic Requirements
- HTTPS with a valid SSL certificate (self-signed certificates do not work)
- Safari or Chrome on iOS/macOS with a card added to Wallet
- Domain verification in the Apple Developer Account
- Apple Pay support in your payment gateway
Domain Verification
For each domain that accepts the payment system, you must complete verification:
- Download the verification file from the Apple Pay Merchant Configuration (Stripe Dashboard, CloudPayments panel, or Apple Developer)
- Place it at the exact path:
/.well-known/apple-developer-merchantid-domain-association(no redirects, served with Content-Typetext/plain) - Verify the file returns HTTP 200 using
curlor a browser
location /.well-known/apple-developer-merchantid-domain-association {
root /var/www/well-known;
default_type text/plain;
}
In Laravel, the file is served via a route—we configure this during deployment.
What to do if the verification file isn't being pulled
Check that the file is accessible at the path `/.well-known/apple-developer-merchantid-domain-association` and returns HTTP 200. Errors often occur due to an incorrect path or missing file in the root directory. If using Nginx, ensure the location block isn't overridden.Integration Steps
-
Domain verification – Place the verification file in
.well-known/(1 hour). - Merchant account setup – Register in Apple Developer (1–2 days).
- Payment Request API integration – Develop and test (2–3 days).
- Sandbox testing – Validate with test cards (1 day).
- Production deployment – Configure domains and SSL (0.5 day).
Integration via Payment Gateways
Stripe Integration
Stripe handles all Apple Pay Merchant Certificate work. After domain verification in the Stripe Dashboard, the button appears automatically in PaymentElement:
import { PaymentElement, useStripe, useElements } from '@stripe/react-stripe-js';
function StripeCheckout() {
const stripe = useStripe();
const elements = useElements();
const handleSubmit = async () => {
await stripe?.confirmPayment({
elements: elements!,
confirmParams: { return_url: window.location.origin + '/payment/success' },
});
};
return (
<form onSubmit={handleSubmit}>
<PaymentElement />
<button type="submit">Pay</button>
</form>
);
}
To show only Apple Pay / Google Pay buttons (without the full form), use Payment Request Button:
import { useStripe } from '@stripe/react-stripe-js';
import { useEffect, useState } from 'react';
function ExpressCheckout({ amount }: { amount: number }) {
const stripe = useStripe();
const [paymentRequest, setPaymentRequest] = useState<any>(null);
const [canPay, setCanPay] = useState(false);
useEffect(() => {
if (!stripe) return;
const pr = stripe.paymentRequest({
country: 'RU',
currency: 'rub',
total: {
label: 'Total',
amount,
},
requestPayerName: true,
requestPayerEmail: true,
});
pr.canMakePayment().then(result => {
if (result) {
setPaymentRequest(pr);
setCanPay(true);
}
});
pr.on('paymentmethod', async (ev) => {
const { error } = await stripe.confirmCardPayment(clientSecret, {
payment_method: ev.paymentMethod.id,
});
if (error) {
ev.complete('fail');
} else {
ev.complete('success');
}
});
}, [stripe, amount]);
if (!canPay) return null;
return <PaymentRequestButtonElement options={{ paymentRequest }} />;
}
CloudPayments Integration
const widget = new cp.CloudPayments();
widget.charge(
{
publicId: 'pk_xxxx',
description: 'Order #12345',
amount: 1500,
currency: 'RUB',
invoiceId: 'order-12345',
},
(options) => console.log('success', options),
(reason) => console.error('fail', reason),
);
CloudPayments automatically displays the Apple Pay button instead of the standard card form when the device supports it.
Client-Side Support Check
function isApplePayAvailable(): boolean {
return (
typeof window !== 'undefined' &&
'ApplePaySession' in window &&
ApplePaySession.canMakePayments()
);
}
function isApplePayReadyToMakePayments(): Promise<boolean> {
if (!('ApplePaySession' in window)) return Promise.resolve(false);
return ApplePaySession.canMakePaymentsWithActiveCard('merchant.com.your-company');
}
Common Problems and Solutions
Error "The domain yourdomain.com is not registered"—the verification file is not found or returns 404. Use curl to check if the file returns 200 at /.well-known/apple-developer-merchantid-domain-association.
Apple Pay does not appear on a test device—ensure the device uses the Apple Pay Sandbox test card (add it in Settings → Wallet & Apple Pay → Simulator Environment → Sandbox Cards).
The domain must be verified separately for each subdomain. Verifying example.com does not apply to shop.example.com.
Why Choose Stripe for Integration?
Stripe makes the integration 3× faster than manual setup via Apple Pay JS API. All certificates are generated automatically, and UI components adapt to the browser. CloudPayments is also good for Russian projects but requires manual merchant account creation. Tinkoff works for the ecosystem, but integration is less transparent. We select the optimal gateway for your project. According to Apple Pay on the Web documentation, using a certified payment service provider reduces integration complexity.
| Payment Gateway | Native Apple Pay Support | UI Components | Domain Verification | Sandbox Testing |
|---|---|---|---|---|
| Stripe | Yes, out of the box | PaymentElement, Payment Request Button | Automatic in Dashboard | Built-in Sandbox |
| CloudPayments | Yes, automatically | CP Widget | Via Apple Developer | Manual Sandbox setup |
| Tinkoff | Via API | Own form | Via Apple Developer | Test merchant application required |
| Stage | Description | Estimated Time |
|---|---|---|
| Domain verification | Place file in .well-known | 1 hour |
| Merchant account setup | In Apple Developer | 1–2 days |
| Payment Request API integration | Development and testing | 2–3 days |
| Sandbox testing | Verify in test environment | 1 day |
| Production deployment | Configure domains, SSL | 0.5 day |
Deliverables
- Domain verification (place file in .well-known)
- Merchant account setup in Apple Developer
- Payment Request API or Stripe Elements integration
- Sandbox and Production testing
- Documentation for your team
- Manager training on Apple Pay operations
- Post-launch support for 30 days
We have 10+ years of web development experience and have integrated Apple Pay for 15+ projects—from e-commerce stores to subscription services. We guarantee support and updates for payment modules when new API versions are released. Integration cost: from $500 to $2,000 depending on complexity. Contact us to get an accurate cost and timeline estimate for the integration tailored to your project.
Learn more about the technology in the Apple Pay documentation.







