custom CSS option is scoped to checkout presentation. It cannot read payment values, change the amount, or disable validation.
Choose a mode
Create the session on your server. The server validates the cart, selects the allowed methods, supplies the appearance, and returns only the session ID and short-lived client token to browser code.
Server configuration
Hosted checkout
Redirect from a server response or a user action using the returnedcheckoutUrl. Keep the order pending at this point. The success, failure, or cancellation page should display the session result but must not fulfill the order. Fulfill only after a verified payment event.
In-page checkout
Allowed origins and return URLs
Register each exact HTTPS origin that can mount in-page checkout. An origin is a scheme, host, and optional port; a path is not an origin. Keep return URLs on an allowlist and include only your own order reference. Never put an API key, webhook secret, or client token in a query string.Locale and accessibility
Setlocale explicitly for a multilingual storefront. Keep the checkout container visible, keyboard reachable, and announced with an aria-live status region. Test narrow screens, zoom, focus order, validation text, contrast, and reduced motion. Format money using the returned currency and minor-unit amount; do not derive totals from localized labels.