> ## Documentation Index
> Fetch the complete documentation index at: https://docs.sellauth.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Checkout Session

> Creates a checkout session (invoice) server-side and returns the URL to send the buyer to. Requires an API key; call it from your backend, never from a browser. Cart items are either <b>catalog items</b> (<code>productId</code> + <code>variantId</code>) or <b>custom items</b> (<code>name</code> + <code>price</code>, for one-off charges that are not in your catalog); both kinds can be mixed. If you pass both <code>email</code> and a payment method, the invoice is created as <code>pending</code> and a payment session is started immediately, so the returned <code>url</code> goes straight to the payment provider; otherwise it opens the hosted checkout where the buyer completes those steps. Available on plans with the Checkout API feature.



## API Specification

The full API specification for this endpoint is available in the [documentation index](https://docs.sellauth.com/llms.txt).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.