Skip to main content
The Checkout API is the full-code way to sell: your backend creates a checkout session and receives a URL to send the buyer to. Use it when checkout links (no code) or the checkout embed (low code) are not flexible enough, for example to charge for one-off custom orders, prefill buyer details, or preselect a payment method.
Requires an API key (Account > Developers in the dashboard) and a plan with the Checkout API feature. Call it from your backend only; never expose your API key in a browser.

Create a session

One endpoint: POST /v1/shops/{shopId}/checkout. Full parameter list and playground: Create Checkout Session.
Response:
Redirect the buyer to url. Without a preselected payment method it opens the hosted checkout; with email + a payment method it goes straight to the payment provider (see below).

Cart items

Each cart item is one of two kinds, and both kinds can be mixed in one cart:
References a product you sell. Stock, delivery, and pricing come from the catalog.

Delivering custom items

Custom items accept three optional fields. instructions can be combined with either of the other two; deliverables and dynamic_url are mutually exclusive. None of them is allowed on catalog items, which deliver from the product.
You already have the content (a license key, a download link, credentials). Pass it up front and SellAuth reveals it on the checkout page and in the order email once the invoice is paid.
deliverables is an array of strings, one per line, up to 1000 lines of 4096 characters and 128 KB in total. instructions is HTML, up to 65535 characters.
Per-item extras: custom_fields (values for the product’s custom fields, keyed by field name) and subscribe (start a subscription on subscription-enabled variants).

Addons

An addon is added as its own catalog item, attached to the product it is bought with through parentVariantId. Put the parent in the cart as usual, then the addon with parentVariantId set to the parent’s variantId:
The addon must be one of the parent product’s addons, and the parent must be in the same cart. The checkout and invoice show the addon under its parent, and the invoice item carries parent_variant_id when you fetch it later.

Skipping checkout steps

Provide what you already know and the buyer will not be asked for it:
With both email and a payment method (payment_method_id, or the deprecated gateway type), the invoice is created as pending and a payment session starts immediately: the returned url points directly to the payment provider (Stripe, PayPal, a crypto payment page, and so on). Also accepted: billing and shipping address fields (billing_*, shipping_*), an affiliate code to credit, newsletter opt-in, and buyer context you should forward from your backend (ip, country_code, user_agent) so fraud checks see the real buyer instead of your server.

Metadata

Attach up to 10 string values; they are stored on the invoice and returned when you fetch it later:

Attribution

If your backend knows how the buyer arrived, forward it so the invoice carries the same campaign data your storefront orders get. Keys are utm_source, utm_medium, utm_campaign, utm_term, utm_content and referrer_host (host only, no path), each at most 100 characters:

After the sale

Track payment and delivery with HTTP notifications, or poll Get Invoice with the returned invoice_id.