{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-guides/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":["admonition","cards","card"]},"type":"markdown"},"seo":{"title":"Apple Pay","description":"Shift4 Payment Platform REST API."},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"apple-pay","__idx":0},"children":["Apple Pay"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple Pay is triggered via a wallet button component: shift4.js renders an Apple Pay button into the element you mount it on. There is no ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["continue()"]}," call — the payment flow starts when the customer taps the button, and the customer's email (and, when the Checkout Session collects them, billing/shipping addresses) is extracted from the wallet response automatically."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"requirements","__idx":1},"children":["Requirements"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"domain-registration","__idx":2},"children":["Domain registration"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple only shows the payment sheet on registered merchant domains, so your domains must be registered before the button will work. This is a joint process with ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Shift4 support"]},"."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Support provides Apple's verification file. Publish it at ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/.well-known/apple-developer-merchantid-domain-association"]}," on each domain that will render the button. Each subdomain counts as a separate domain and wildcards (for example ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["*.example.com"]},") are not supported, so every subdomain must be listed explicitly and verified individually."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Once the files are in place, contact support with the full list of domains and subdomains. Shift4 handles everything on the Apple side — you don't need an Apple Developer account or your own certificates."]},{"$$mdtype":"Tag","name":"Admonition","attributes":{"type":"info"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If you already hold your own Apple merchant identifier and certificates, ask support about using those instead."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"business-eligibility","__idx":3},"children":["Business eligibility"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Apple restricts certain business categories — see the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://developer.apple.com/apple-pay/acceptable-use-guidelines-for-websites/"},"children":["Apple Pay Acceptable Use Guidelines"]},". If your merchant category code falls into one, the wallet is suppressed and no button is shown."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"on-your-page","__idx":4},"children":["On your page"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["HTTPS is mandatory"]}," — Apple Pay does not work on plain HTTP origins."]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"content-security-policy","__idx":5},"children":["Content Security Policy"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["In addition to the ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/core-concepts/checkout/payment-components#content-security-policy"},"children":["baseline Payment components policy"]},", Apple Pay needs Apple's script allowed:"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"header":{"controls":{"copy":{}}},"source":"script-src https://applepay.cdn-apple.com\n"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"3d-secure","__idx":6},"children":["3D Secure"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["No additional 3D Secure challenge is performed for Apple Pay. The wallet supplies its own cryptographic authentication data with the payment — there is no separate challenge for the customer to complete, and nothing for you to handle."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"example","__idx":7},"children":["Example"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"html","header":{"controls":{"copy":{}}},"source":"<script src=\"https://js.shift4.com/v1/shift4.js\"></script>\n\n<div id=\"apple-pay-button\"></div>\n<div id=\"result\"></div>\n<div id=\"error\"></div>\n\n<script>\n  (async function () {\n    var shift4 = Shift4('pk_sandbox_XXXXXXXXXXXXXXXXXXXX');\n    var checkout = await shift4.createCheckout('{{clientSecret}}');\n\n    checkout.addEventListener('checkout_session.succeeded', function () {\n      document.getElementById('result').textContent = 'Payment successful';\n    });\n    checkout.addEventListener('payment.failed', function (event) {\n      document.getElementById('error').textContent = event.error.message;\n    });\n\n    checkout.createComponent('apple-pay-button').mount('#apple-pay-button');\n  })();\n</script>\n","lang":"html"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"if-the-customer-dismisses-the-sheet","__idx":8},"children":["If the customer dismisses the sheet"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The wallet SDK manages its own confirmation sheet. If the customer dismisses it without authorising, no payment is initiated and no event fires — the checkout stays mounted and they can try again. See ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/guides/core-concepts/checkout/payment-components/events-and-errors"},"children":["Events & error handling"]}," for the full interruption matrix."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"next-steps","__idx":9},"children":["Next steps"]},{"$$mdtype":"Tag","name":"Cards","attributes":{"columns":3,"cardMinWidth":240},"children":[{"$$mdtype":"Tag","name":"Card","attributes":{"title":"Google Pay","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"start","variant":"filled","to":"/guides/core-concepts/checkout/payment-components/google-pay"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Add the Google Pay button — CSP and 3D Secure notes."]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"Events & error handling","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"start","variant":"filled","to":"/guides/core-concepts/checkout/payment-components/events-and-errors"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The event model and how to handle interruptions and failures."]}]},{"$$mdtype":"Tag","name":"Card","attributes":{"title":"Confirm the payment","imagePosition":"start","iconPosition":"auto","layout":"vertical","align":"start","variant":"filled","to":"/guides/core-concepts/checkout/confirm-payment"},"children":[{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Verify the Checkout Session server-side before you fulfil."]}]}]}]},"headings":[{"value":"Apple Pay","id":"apple-pay","depth":1},{"value":"Requirements","id":"requirements","depth":2},{"value":"Domain registration","id":"domain-registration","depth":3},{"value":"Business eligibility","id":"business-eligibility","depth":3},{"value":"On your page","id":"on-your-page","depth":3},{"value":"Content Security Policy","id":"content-security-policy","depth":4},{"value":"3D Secure","id":"3d-secure","depth":2},{"value":"Example","id":"example","depth":2},{"value":"If the customer dismisses the sheet","id":"if-the-customer-dismisses-the-sheet","depth":2},{"value":"Next steps","id":"next-steps","depth":2}],"frontmatter":{"title":"Apple Pay","description":"Add an Apple Pay button with Payment components — domain registration via Shift4 support, HTTPS and CSP requirements, and the mount-and-listen example.","markdown":{"lastUpdatedBlock":{"hide":true}},"seo":{"title":"Apple Pay"}},"lastModified":"2026-10-08T08:30:07.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/guides/core-concepts/checkout/payment-components/apple-pay","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}