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

Every element handle exposes a read-only .value getter that returns the current snapshot without waiting for an onChange fire. This is useful for stitching independent elements together (as in the example above, where email.value is read inside card’s onSubmit handler).
Last modified on July 17, 2026