Show a loading state until onReady
Checkout renders a skeleton while it fetches your merchant configuration. Keep any external UI (a page-level spinner, disabled buttons) in a loading state until onReady fires.
Gate external CTAs on onChange.complete
If you render your own Pay button outside Checkout, disable it until the form validates:
complete flips true when every visible field passes validation and a payment method is selected and ready.
Authorize on the server
TheonSubmit payload is tokenized and safe to POST from the browser to your server. Do not call the Overflow authorize endpoint directly from the browser: your secret key stays server-side.
Handle onError
onError fires for validation failures and runtime errors. Surface a message to the shopper and let them retry.
Retry on UNKNOWN_KID
If your authorize endpoint returns 400 { code: 'UNKNOWN_KID' } after a bank submission, call overflow.invalidateBankFieldEncryptionCache() and prompt the shopper to submit again. This clears the cached bank field encryption key so the next submit uses the current one.
Match your brand
Pass tokens at construction so every section shares your palette, radii, and typography:appearance on nested Checkout slots. Checkout is themed as a single cohesive unit. See Theming.
Order matters for wallets
If you want wallets prominent, list them first:Accessibility
- Provide an accessible label on your surrounding page container.
- Do not add
tabindexoverrides inside the mount host; Checkout manages focus order. - The submit button inside Checkout is a real
<button>with a keyboard-navigable focus ring.
Test with test_pub_…
Use a test_pub_… publishable key while you build. Swap to live_pub_… for production. The same code paths run on both; only the API environment changes.
Next steps
Accept a payment
End-to-end walkthrough with server code.
Handle validation errors
Patterns for surfacing validation errors.