Add one-click payment buttonsBeta
Use the Express Checkout Element to show one-click payment buttons.
Private preview
The Custom Checkout integration is in private preview. To request access, click here.
The Express Checkout Element gives you a single integration for accepting payments through one-click payment buttons. Supported payment methods include Link, Apple Pay, and Google Pay.
Try the demo
In the following demo, you can toggle some of the prebuilt options to change the background color, layout, size, and shipping address collection of the payment interface. The demo displays Google Pay and Apple Pay only on their available platforms. Payment Method buttons are only shown in their supported countries.
If you don’t see the demo, try viewing this page in a supported browser.
Prerequisites
Before you start, you must:
- Enable Link, Apple Pay, or Google Pay in the Dashboard.
- Add a payment method to your browser. For example, you can add a card to your Google Pay account or to your Wallet for Safari.
- Serve your application over HTTPS. This is required in development and in production. You can use a service such as ngrok.
- Register and verify your domain in both test mode and live mode.
Handle one-click payments
The Express Checkout Element emits the confirm event when your customer finalizes their payment. Add a handler that responds to the event by calling event.
and pass it to the Express Checkout Element.
The event also contains the following fields:
- expressPaymentType: One of
'apple_
,pay' 'google_
, orpay' 'link'
. - billingDetails: Object containing information about the customer’s billing details.
- shippingAddress: Object containing information about the customer’s shipping address.
- shippingRate: Object containing information about the selected shipping rate.
The following options are also supported:
- buttonHeight
- buttonTheme
- layout
- paymentMethodOrder
- paymentMethods
- Note: Both your Dashboard configuration and Checkout configuration affect the availability of payment methods in the Express Checkout Element. By default, it displays all available payment methods based on both configurations. If you set the
paymentMethods
option, the Express Checkout Element merges your specified options with the default logic to determine the final set of payment methods displayed.
- Note: Both your Dashboard configuration and Checkout configuration affect the availability of payment methods in the Express Checkout Element. By default, it displays all available payment methods based on both configurations. If you set the