Skip to content
Create account
or
Sign in
The Stripe Docs logo
/
Ask AI
Create account
Sign in
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Developer tools
Get started
Payments
Finance automation
Get started
Payments
Finance automation
Platforms and marketplaces
Money management
Overview
About Stripe payments
Upgrade your integration
Payments analytics
Online payments
OverviewFind your use caseManaged Payments
Use Payment Links
Build a checkout page
Build an advanced integration
Build an in-app integration
Payment Methods
Add payment methods
Manage payment methods
Faster checkout with Link
Payment interfaces
Payment Links
Checkout
Web Elements
    Overview
    Payment Element
    Express Checkout Element
      Migrate to the Express Checkout Element
      Express Checkout Element comparison
    Address Element
    Currency Selector Element
    Link Authentication Element
    Payment Method Messaging Element
In-app Elements
Payment scenarios
Custom payment flows
Flexible acquiring
Orchestration
In-person payments
Terminal
Other Stripe products
Financial Connections
Crypto
Climate
HomePaymentsWeb Elements

Express Checkout Element

Show multiple one-click payment buttons with a single component.

Copy page
Checkout UX showing Apple Pay, Link, and PayPal buttons

The Express Checkout Element is an integration for accepting payments through one-click payment methods buttons. Supported payment methods include Link, Apple Pay, Google Pay, PayPal, Klarna, and Amazon Pay.

With this integration, you can:

  • Dynamically sort payment buttons based on a customer’s location.
  • Add payment buttons without any front-end changes.
  • Integrate Elements seamlessly by reusing an existing Elements instance to save time.

Try the demo

In the following demo, you can toggle some of the prebuilt options to change the background colour, 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.

OptionDescription
Merchant countrySet this using the publishable key that you use to initialize Stripe.js. To change the country, you must unmount the Express Checkout Element, update the publishable key, then re-mount the Express Checkout Element.
Background colorSet colors using the Elements Appearance API. Button themes are inherited from the Appearance API but you can also define them directly when you create the Element.
Desktop and mobile sizeUse the dropdown to set the max pixel width of the parent element that the Express Checkout Element is mounted to. You can set it to 750px (Desktop) or 320px (Mobile).
Max columns and max rowsSet these values using the layout parameter when you Create the Express Checkout Element.
Overflow menuSet this using the layout parameter when you Create the Express Checkout Element.
Collect shipping addressTo collect shipping information, you must pass options when creating the Express Checkout Element. Learn more about collecting customer details and displaying line items.

Start with a guide

Add one-click wallets to your checkout page

Build an integration with the Express Checkout Element using the Checkout Sessions API.

Use one-click wallets in advanced integrations

Build an integration with the Express Checkout Element using the Payment Intents API.

Migrate to the Express Checkout Element

Migrate from the Payment Request Button Element to the web Express Checkout Element.

View the Stripe.js reference

Payment methods

The Express Checkout Element presents one-click payment methods that are active, supported, and set up.

  • Some payment methods require activation in the Dashboard.
  • Payment methods are only available when the customer uses a supported browser and pays in a supported currency.
  • Some payment methods require setup actions from the customer. For example, a customer won’t see a Google Pay button if they don’t have Google Pay set up.
  • Register your domain in both your testing environment and live mode.

The element sorts payment methods by relevance to your customer.

To control these behaviours, you can customise the payment methods.

Supported browsers

Certain payment methods work with specific browsers.

Apple PayGoogle PayLinkPayPalAmazon PayKlarna
Chrome1
Edge
Firefox
Opera
Safari2
Chrome on iOS 16+
Firefox on iOS 16+
Edge on iOS 16+

1Other Chromium browsers might be supported. For more information, see supported browsers.

2When using an iframe, its origin must match the top-level origin (except for Safari 17+ when specifying allow="payment" attribute). Two pages have the same origin if the protocol, host (full domain name), and port (if specified) are the same for both pages.

Layout

By default, when the Express Checkout Element displays multiple buttons, it arranges the buttons in a grid based on available space, and shows an overflow menu if necessary.

You can override this default and specify a grid layout yourself with the layout option.

Text

You can control a button’s text by selecting a buttonType. Each wallet offers its own types.

Link only offers one button type, which presents the “Pay with Link” call to action and the Link logo.

We attempt to detect your customer’s locale and use it to localise the button text. You can also specify a locale.

This example code includes the call to action “Buy” or “Buy now” for buttons that support it. Then, it specifies the locale de to get their German equivalents.

const expressCheckoutOptions = { buttonType: { applePay: 'buy', googlePay: 'buy', paypal: 'buynow', klarna: 'pay', } } const elements = stripe.elements({ locale: 'de',

Appearance

You can’t fully customise the appearance of Express Checkout Element buttons because each payment method sets its own logo and brand colours. You can customise the following options:

  • Button height
  • Border radius using variables with the Appearance API
  • Button themes

Note

The Apple Pay button automatically resizes when border radius increases beyond a certain threshold. If modifying the default border radius, make sure to test it with all active payment methods.

This example code sets up an elements group with a light theme and 36px border radius, makes buttons 50px tall, and overrides the theme to use the white-outline version of the Apple Pay button.

const appearance = { theme: 'stripe', variables: { borderRadius: '36px', } } const expressCheckoutOptions = { buttonHeight: 50, buttonTheme: {

We support the following themes:

Link has a single button theme, which is readable on either a light or a dark background.

Customise payment methods

You can’t specify which payment methods to display. For example, you can’t force a Google Pay button to appear if your customer’s device doesn’t support Google Pay.

But you can customise payment method behaviour in various ways, such as:

  • You can activate or deactivate payment methods from the Dashboard.
  • You can override Stripe’s default logic of sorting payment methods by relevance. Use the paymentMethodOrder option to set your preferred order.
  • If there is too little room in the layout, low-relevance payment methods might appear in an overflow menu. Customise when the menu appears using the layout option.
  • To prevent Apple Pay or Google Pay from appearing, set paymentMethods.applePay or paymentMethods.googlePay to never.
  • To allow Apple Pay or Google Pay to appear when they’re not set up, set paymentMethods.applePay or paymentMethods.googlePay to always. This still won’t force them to appear on unsupported platforms, or when the payment is in an unsupported currency.

Regional considerations
Finland
Sweden

Regulations in Finland and Sweden require you to present debit payment methods first before showing credit payment methods at checkout in these countries.

Was this page helpful?
YesNo
Need help? Contact Support.
Join our early access programme.
Check out our changelog.
Questions? Contact Sales.
LLM? Read llms.txt.
Powered by Markdoc