If you already have orders created in the background (based on customer preferences like date, time, or type of experience), you can send the customer directly into the checkout widget with that predefined order.
This way, the customer skips the product selection step and lands directly on the checkout page.
Upgrade or Cross-sell - review additional offers
Pickups - select their pickup point
Questions - answer booking questions
Cart Summary - review everything bookings in the cart
Checkout - fill in their contact details and confirm the order
📗 TIP
For a full description of page input, see How to Trigger Checkout with a Specific Page.
📗 TIP
For details on opening the widget programmatically, see How to Open the Checkout Widget Automatically from Marketing Links.
Implementation
Because the order in this flow is created outside the customer's browser (by your own backend), Checkout cannot assume the browser that is about to open it is allowed to.
When you create the order, save the recoveryToken your API returns alongside the orderID. You will need to pass both into Checkout together. orderID on its own identifies which order to open, but without recoveryToken Checkout will reject it.
📒 NOTE
If you skip this, Checkout will typically render as if there is nothing available for the order (no dates or times), rather than showing a clear error. That empty-looking state is the symptom of a rejected/unrecoverable order, not an actual availability problem.
Check your browser's network tab for a 400 INVALID_ORDER_ID (or similar) response to confirm.
📒 NOTE
The code below is a sample snippet. To make it functional on your website, you will need to adjust it to your own specifications (for example, replacing the temporary order ID with a real one).
This version also includes extra lines for testing purposes and comments that explain how each part of the code works. In production, remove the testing lines and uncomment the line that reads from the actual page URL.
function openOrderFromURL() {
// For production use, this line must be uncommented.
// const urlParams = new URLSearchParams(window.location.search);
// For production use, these lines need to be deleted.
// This block is here only so you can try the flow locally before
// wiring it up to your own order-creation process.
const temporaryOrderID = "FILL IN ORDER_ID"
const temporaryRecoveryToken = "FILL IN RECOVERY_TOKEN"
const temporaryPage = "checkout"
const temporaryURL = new URL(`https://example.com/page?orderID=${temporaryOrderID}&recoveryToken=${temporaryRecoveryToken}&page=${temporaryPage}`)
const urlParams = new URLSearchParams(temporaryURL.search)
const orderID = urlParams.get('orderID');
// recoveryToken is required here because this order was created outside
// the current browser session (see "Before You Start" above).
const recoveryToken = urlParams.get('recoveryToken');
// Currently only the 'checkout' value can be used to redirect the customer.
const page = urlParams.get('page') ?? 'checkout';
return {orderID, recoveryToken, page};
}
window.addEventListener('load', function() {
const { orderID, recoveryToken, page } = openOrderFromURL();
if (orderID) {
if (typeof window.Ventrata === 'function') {
// This Ventrata function accepts all attributes you can pass into the data-config.
// For an order created in the current browser session, orderID and page are enough.
// For an order created elsewhere (e.g. your backend, as in this guide),
// you must also pass the recoveryToken returned when the order was created.
// If your data indicates the order requires questions, cross-sell, or checkout,
// you can direct the user to that specific page using the page parameter.
// However, if you only need to send them directly to fill in contact details, set "page": "checkout".
// More options are available in the documentation.
window.Ventrata({"orderID": orderID, "recoveryToken": recoveryToken, "page": page});
} else {
console.error('Ventrata checkout did not load.');
}
}
});
Checkout Flow with a Predefined Order
Your system creates an order in the background and receives back an orderID and recoveryToken. You generate a link that includes both, and the desired page, for example:
https://example.com/page?orderID=c6efd05f-11aa-41cc-9758-4aa0f3549439&recoveryToken=<RECOVERY_TOKEN>&page=checkout
‼️ IMPORTANT
Treat recoveryToken like a credential. Anyone with it can open and act on this order. Pass it over HTTPS and avoid logging it.
When the customer visits the link, the script above detects the orderID, recoveryToken and page. The widget opens directly on that page with the predefined order.
