
Hosted checkout
OpenStock Docs
Redirect customers to a OpenStock-hosted checkout created from your own backend.
Hosted checkout lets you keep your own site or app while OpenStock handles payment, receipts and delivery. You create a session server-side and redirect the customer to it.
Choosing what to sell#
Pass product_ids to sell products from your catalogue. Prices come from the product or variant, stock is enforced, and the order is delivered like any other store order.
{
"product_ids": [
{
"id": "prod_123",
"quantity": 1,
"variant_name_or_id": "Lifetime"
}
]
}Session lifecycle#
Sessions start as pending and end as completed, cancelled or expired. They expire after 24 hours by default; set expires_in_seconds or expires_in_hours to change that, and expired_url to control where late visitors are sent.
Customising the page#
Use hide_navbar and hide_footer for a focused page, and disable_coupons or disable_gift_cards when the price must not change.
See Create session for every parameter.