Create a new checkout session to initiate a billing flow.
Checkout sessions are temporary objects that allow customers to subscribe to plans, change plans, or update quantities. They generate a preview of the contract and pricing that will be applied when the checkout is confirmed.
Checkout Type Detection: The checkout type is automatically determined based on the provided fields:
plan_based): Provide plan_id without contract_idcontract_id and plan_idcontract_id with product_quantities but no plan_idBilling Estimates: The response includes simplified billing estimates with:
current_invoice: Charges for the current billing periodnext_invoice: Upcoming charges for the next period (null if none)
Estimates are generated as a preview and do not create actual invoices.The checkout session expires after 24 hours if not completed.
Documentation Index
Fetch the complete documentation index at: https://docs2.zenskar.com/llms.txt
Use this file to discover all available pages before exploring further.
Schema for creating a new checkout session.
Supports two flows based on contract_id presence:
ID of the plan. Required for new contracts.
Existing contract ID for amendments. When provided, product_overrides are required to specify quantity updates.
Start date for the contract. Defaults to current date if not provided.
End date for the contract. Optional for evergreen contracts.
ID of an existing customer. Required for non-guest checkouts.
ID of the business entity. Required for guest checkouts.
When the checkout session expires. Defaults to system configuration if not provided.
URL to redirect customers after successful checkout completion.
1 - 2083URL to redirect customers if they cancel the checkout.
1 - 2083List of product overrides for the checkout. Each entry can specify quantity and/or is_enabled overrides.
Checkout session created successfully
Response schema for checkout session.
Does not include the full contract data.
Unique checkout session ID.
Organization ID.
Current status of the checkout session.
ID of the plan being purchased.
Contract ID. For amendments/plan switches: set at creation. For new contracts: set after confirmation.
Contract start date.
Contract end date.
ID of the customer (for non-guest checkouts).
ID of the business entity.
Whether this is a guest checkout.
Customer data for guest checkouts.
Invoice estimates (current and next invoice only).
When the checkout session expires.
URL to redirect after successful checkout.
URL to redirect if checkout is cancelled.
Product overrides (quantity and/or is_enabled).
When the checkout was created.
When the checkout was last updated.