Apple Pay
Accept Apple Pay on hosted checkout, payment links and your own website.
Apple Pay lets customers pay with a card saved on their iPhone, iPad or Mac. It appears as its own option at checkout, next to cards, Fawry and ValU. XPay turns Apple Pay on for your account; to request it, contact support.
Where it works
Hosted checkout and payment links
Works as soon as Apple Pay is on for your account. No setup needed.
Your website
Drop-in and Elements run on your own domain, so Apple needs to know your website. Set it up once in the dashboard.
On Safari and Apple devices, Apple Pay opens on the same screen. On other browsers, Apple shows a code the customer scans with their iPhone to finish paying.
Set up Apple Pay for your website
You need an Apple Developer account with a Merchant ID. In the dashboard, click your account menu and pick Settings, click Payment methods, then click Set up Apple Pay. The setup lives under Your website.
Enter your Apple Merchant ID
Copy the Merchant ID from your Apple Developer account into Apple Merchant ID.
Create the two certificates
Click Download CSR for the Merchant Identity Certificate and for the Payment Processing Certificate. In Apple Developer, create each certificate under the same Merchant ID, using the matching CSR.
Upload the certificates
Click Choose certificate for each one, then click Save certificates. When both are accepted, the status reads Certificates valid.
Register your website with Apple
In Apple Developer, register every domain and subdomain where customers pay, under the same Merchant ID. Apple asks you to host a verification file at https://your-domain/.well-known/apple-developer-merchantid-domain-association.txt.
One set of certificates covers all your websites, as long as Apple has verified each domain. When a certificate is close to expiring, the dashboard shows the date. Replace either certificate on its own; the other one stays saved.
If you build with Elements
Drop-in needs no extra code. With Elements, Apple Pay runs through the same payment element as cards.
In deferred mode (you create the session when the customer pays), call elements.submit() first, straight from the customer's click. When the customer picked Apple Pay, this opens the Apple Pay sheet. If it returns an error, show it and stop. Otherwise create the session on your server and call confirmPayment() as usual. See Deferred mode for the full example.
If your code does other async work before calling elements.submit(), the browser no longer counts it as the customer's click. The SDK then shows a small Apple Pay button so the customer can continue with one more tap.
When Apple Pay does not show
| What you see | What it means | What you do |
|---|---|---|
| No Apple Pay anywhere | Apple Pay is not on for your account in this mode. | Contact support. |
| Apple Pay on hosted checkout, not on your website | Your website setup is not finished. | Finish the steps above until it reads Certificates valid. |
| Apple Pay missing from some checkouts | Apple Pay is off in the configuration those checkouts use. | Turn it on in Payment methods. |
| The sheet does not open on one domain | Apple has not verified that domain. | Register the domain in Apple Developer. |
| One customer does not see it | Their device or browser has no Apple Pay ready to use. | Nothing to fix. They can pay with another method. |