Skip to main content
When Checkout’s built-in layout does not fit, mount the individual elements and compose them into your own form. This guide shows the common pattern: an email input, a card element, and a submit button that gates on both. For a single-mount all-in-one flow, use Accept a payment instead.

Pattern

  1. Mount every element you need (contact fields, address, payment method).
  2. Gate an external submit control on each element’s onChange.complete.
  3. On submit, call element.submit() on the payment-method element and forward its onSubmit payload to your server.

Example

Notes on submitButton

submitButton is a pure relay. It fires onSubmit with value: undefined on every click. Use it to drive an external card.submit() (or bank.submit()), or wire its onSubmit to your own submission logic. See the submitButton reference. You do not have to use submitButton. A plain <button> outside the SDK works too:

Read values without waiting for events

Some elements expose a .value getter for reading their current snapshot without waiting for an event — contact atoms like email, address, bank, and the custom inputs. card, checkout, applePay, googlePay, and submitButton do not; read their state from onChange and onSubmit payloads.
Last modified on July 29, 2026