This quickstart creates a hosted checkout session from a trusted server and continues it through the hosted redirect endpoint. The same session contract can be mounted in-page; use Customize checkout when you need that mode.

1. Create a checkout session

Use the merchant API key only from your server:
Store the returned session ID and client token on the server-side integration boundary. Do not log the token. The response contains a session ID, a short-lived client token, status, and expiry. Store the session ID with your order. Return only the session ID and client token needed by the selected integration.

2. Redirect the customer

For hosted checkout, submit the client token to POST /api/v1/checkout-sessions/{id}/redirect from your server-rendered form or browser handoff. For in-page checkout, pass the session ID and token to the SDK. The token is sent in the request body or SDK configuration and never in the URL.

3. Confirm payment

Listen for the signed payment event, verify its signature, deduplicate by event ID, and fulfill only after the event confirms the payment. A browser return is not proof of payment.

4. Test and launch

Use the Testing guide to exercise success, failure, cancellation, expiry, retries, and webhook delivery. When ready, follow Go live to create production credentials and configure merchant origins.