Before you start
- Choose Demo or production in Environments.
- Store the merchant API key and webhook secret in your server secret manager.
- Register the exact in-page origins and return URLs in checkout settings.
- Create or resolve the order on the server and calculate its amount in minor units.
Hosted checkout
Create a checkout session from your server, then redirect the customer tocheckoutUrl. Hosted checkout is the fastest path and works well for email, invoices, and payment links.
Embedded checkout
Create a session withmode: "embedded", load the Zahlo SDK from your website, and mount the session in a customer-owned container. Register the exact website origin before rendering it. See Customize checkout for the full appearance contract.
Request fields
UseamountMinor, currency, mode, paymentMethodTypes, order metadata, registered return URLs, allowed origins, and appearance. Validate all values on the server. Do not send raw card number, security code, or expiry fields to your server.
Completion
Treat the checkout UI and browser callbacks as presentation signals. Your server should fulfill only after a verifiedpayment.confirmed or equivalent terminal event. For a pending or asynchronous method, show a pending state and reconcile by session or payment ID rather than creating a replacement session.