checkout element renders a complete payment form in one mount. It composes the same elements you can use standalone (contact, addresses, payment methods, custom fields) and wires them together so you submit once, validate once, and receive a single tokenized payload.
Reach for Checkout when you want a turnkey form. Reach for standalone elements when you need to lay out fields across multiple steps or screens.
When to use Checkout
- You want a single drop-in that collects everything: shopper contact, addresses, and a payment method.
- You want the SDK to manage section order, conditional visibility, and a single submit lifecycle.
- You want one event stream for the whole form.
Minimal example
What it composes
Checkout renders the following sections, in this default order:- Contact (opt-in; pass
contactto show it). - Shipping address (opt-in; pass
shippingAddress). - Billing address (opt-in; pass
billingAddress). - Payment methods (required; pass
paymentMethods). - Custom elements (opt-in; pass
customElements).
- Contact section
- Shipping address section
- Billing address section
- Payment methods section
- Custom elements section
Contact is opt-in
Omittingcontact (or passing {}) renders Checkout with no contact fields. To collect shopper contact details, explicitly include the keys you need:
Selecting payment methods
Pass a list of method names topaymentMethods. Render order matches array order; the first available method is selected on mount unless you set defaultPaymentMethod.
The submitted value
onSubmit returns a payload tagged with the selected method:
value.method to know which payment branch fired, then forward the whole payload to your server. Your server calls the Overflow API to authorize the charge. See the authorize a payment API reference.
Events
Checkout emits the standard element events:onReady: the form is mounted and interactive.onChange: fires with{ complete, value, errors }on any field change.onSubmit: fires after a successfulsubmit()with the tokenized payload.onError: fires when a submit fails.onClick,onExit: fire from the wallet path (Apple Pay / Google Pay) withvalue.methodset.
source tag: 'contact', 'billingAddress', 'shippingAddress', 'paymentMethod', or 'customElement'. See Events overview.
Next steps
How it works
Lifecycle, section ordering, and the submit flow.
Best practices
Submit-button gating, validation, and accessibility.
Accept a payment
End-to-end integration walkthrough.
Payment methods
Configure card, bank, and wallet options.