Next Commerce
Checkout

Express Checkout

Express checkout renders PayPal, Apple Pay, and Google Pay buttons that create an order without filling out the full form. The SDK only shows a button when the campaign enables that method and the visitor's device/browser supports it.


Add the Container

Express buttons are managed by a container enhancer. Add a container marked data-next-express-checkout="container" with a child target where buttons are injected:

<div data-next-express-checkout="container">
  <div data-next-express-checkout="buttons"></div>
</div>

The SDK injects the supported buttons into the buttons element. You do not create the buttons yourself.

This is a separate enhancer from the main data-next-checkout form. It can live on the same page as the form (shown above it) or stand alone on a cart page.


Which Buttons Appear

A button is rendered only when both conditions are true:

  1. The campaign enables it — the method is in the campaign's available express payment methods (or enabled in your payment config).
  2. The device supports it — Apple Pay requires Safari/iOS, Google Pay requires a compatible Chrome/Android environment, PayPal is broadly available.
MethodInjected valueAvailability check
PayPalpaypalBroadly available
Apple Payapple_paySafari / iOS with Payment Request support
Google Paygoogle_payChrome / Android with Google Pay

If the cart is empty the buttons are disabled and get the next-cart-empty class.


The Express Flow

  1. Visitor clicks an express button
  2. The SDK marks checkout as processing, sets the payment method, and shows a loading overlay
  3. It validates the cart is not empty and tracks an add_payment_info analytics event
  4. It creates a minimal order (cart items + payment method — no address yet) and receives a payment-completion URL
  5. The visitor is redirected to the wallet provider to authorize payment
  6. On return, the SDK finalizes the redirect to your confirmation page and clears the cart

Express orders are created without shipping/billing address up front — the wallet supplies those details to the gateway. Do not expect form field values to be present during an express checkout.


Error Display

Express errors are written into the express error container when present:

<div data-next-component="express-error">
  <span data-next-component="express-error-text"></span>
</div>

Events

The container and processor emit:

EventWhen
express-checkout:initializedA wallet button has been rendered and wired up
express-checkout:startedThe visitor started an express payment
express-checkout:completedThe express order completed
express-checkout:failed / express-checkout:errorThe express payment failed

See Reference → Events for payloads.


Next Steps

  • Card payments and method selection: Payment
  • The shared order + redirect logic: Order Flow

On this page