custom CSS option is scoped to the Zahlo-owned shell. It cannot read payment values, change the amount, disable validation, or style provider-owned sensitive iframe fields. It is capped at 4,000 characters and wrapped in @scope (.zahlo-checkout-root).
Supported appearance contract
The SDK accepts the same neutral appearance object for hosted and in-page checkout:
The server must validate these values before storing or sending them to the browser. The SDK keeps the existing top-level
theme and locale fields as compatibility aliases; appearance is canonical. Secure payment fields can only be styled through the supported appearance options.
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
Submit the client token to the session redirect endpoint from a server response or browser handoff. 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.