This page explains how to add Apple Pay to your existing Web Components integration.
Requirements
Select which endpoint you are using:
API reference
You do not need to send additional fields for Apple Pay. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:
- /sessions: This is the default with Components v5.0.0 or later.
- /payments: If you implemented an additional use case.
If you run into an error, refer to Handle Apple Pay errors.
Component configuration
Step 1: Create a DOM element
Create a DOM element on your checkout page, placing it where you want the payment method form to be rendered:
<div id="applepay-container"></div>
Step 2: Create an instance of the Component
Select which endpoint you are using: