The Checkout Sessions API creates a Wix-hosted checkout session for a set of line items. Each call creates a fresh, single-use session tailored to that buyer and that cart.
Note: If you want a reusable, shareable checkout link with a fixed product set, use the eCom Checkout Templates API instead. Checkout Sessions is for per-buyer, per-request checkouts decided at call time.
With the Checkout Sessions API, you can:
A line item can be a one-time charge or a subscription. Subscription line items trigger recurring billing on a schedule you configure.
Submitted line items and their configuration are locked on the Wix-hosted checkout page: buyers can pay, but they can't change the cart.
subscriptionInfo covers more than just recurring billing:
subscriptionSettings.billingCycles: 1, you can model "free trial then a single charge": a free trial period followed by 1 paid charge at the end.billingCycles greater than 1, the subscription runs for a fixed number of cycles and then stops.billingCycles omitted, the subscription renews indefinitely.One-time items can be combined with a single subscription item. In that case the buyer is charged once at checkout for the one-time items and, if applicable, the first cycle of the subscription. Wix bills any subsequent cycles on the subscription's own schedule.
It's important to note the following points before starting to code:
subscriptionInfo set) is allowed per request. Wix rejects requests with 2 or more subscription items. For how subscription items combine with one-time items, see Line items.checkoutSession.redirectUrl through to the buyer unchanged. The URL carries query parameters Wix needs to render the page correctly. For example, successUrl is forwarded as a query parameter from callbackUrls.thankYouPageUrl. Stripping or rewriting query parameters breaks the buyer-facing flow.callbackUrls.continueBrowsingUrl, callbackUrls.thankYouPageUrl) must be absolute, publicly reachable HTTPS URLs. Wix doesn't synchronously verify them at session generation. An unreachable URL surfaces only when the buyer is redirected, at which point the buyer reaches a broken destination. Validate URLs on your side before passing them in.checkoutSession.id against the buyer record on your side and avoid blind retries on transient failures.redirectUrl (where the buyer is sent to pay) and its id (the session identifier, generated by the call).subscriptionInfo set. Triggers recurring billing instead of a single charge.continueBrowsingUrl is used if they leave the Wix checkout page without paying (clicking Continue browsing or navigating back to a cart-style page); thankYouPageUrl is used after a successful payment.