Skip to main content

Checkout Configuration Inputs and Features

Configuration inputs and checkout features are settings that define how the Ventrata checkout behaves and what it displays.

Configuration inputs and checkout features let you control how the Ventrata checkout works and what it shows to customers. Both are set in the data-config attribute of your checkout script or button, but they are added in different places:

  • Configuration inputs sit directly in data-config, next to your apiKey.

  • Checkout features sit inside a "features" object within data-config.


Add Inputs and Features

Add the inputs and features to the data-config attribute of your script or button in the format below.

Replace input and featureName with the names of the supported inputs and features, and specify their values. Separate multiple entries with a comma ,.

<script
src="https://cdn.checkout.ventrata.com/v3/production/ventrata-checkout.min.js"
type="module"
data-config='{
"apiKey": "<YOUR_API_TOKEN>",
"input1": "value",
"input2": "value",
"features": {
"featureName": value,
"featureName1": value
}
}'>
</script>

📒 NOTE

Configuration input values are passed as strings in quotation marks, for example "lang": "en".

Feature values are mostly true / false without quotation marks, for example "bottomBar": false. Check the Available Values column for each feature.

📗 TIP
Use the Checkout Configurator to build and test your configuration before adding it to your website. Each setting you add appears in the generated script tag, which you can copy and paste into your page. Keep the configurator in TEST mode while experimenting.


Configuration Inputs

Add these directly to the data-config attribute.

Setup

Input

Default

Description

"apiKey"

Required - must be defined at least once per script import

Your apiKey is located in your Ventrata dashboard.

"env"

Not set

"live" OR "test". If left empty checkout defaults to test.


Language and Currency

Input

Default

Description

"lang"

Not set

Optional, lower case, for example, en, cs.

"currency"

Not set

Optional, upper case, for example, USD, EUR, CZK

📒 NOTE

If both "lang" and "currency" are specified in the data-config, the globe icon used to select the language and currency on the checkout is hidden as these parameters are predefined. This is typically used with the multi-booking feature.


Display Mode and Cart

Input

Default

Description

"embedded"

false

Allows the usage of embedded mode.

The page requires the presence of an HTML element with the ventrata-embedded-widget attribute.

To customise embedded mode, see the viewModeMap and embeddedTitle features.

"multibooking"

false

Allows the usage of a cart (multiple bookings in the same order).

Triggers the bottom bar, which informs users about the current order content. To hide it, see the bottomBar feature.


Product, Orders and Pages

Input

Default

Description

"productID"

Not set

ID of the product.

If not set, product list is shown.

"optionID"

Not set

ID of the option.

if set, the option is preselected.

"bookingID"

Not set

ID of the booking (used only for multibooking)

Must be paired with orderID.

"orderID"

Not set

ID of the order.

Required whenever you are opening a predefined order, for example with bookingID (multibooking) or with page, see How to Trigger Checkout with a Specific Page. bookingID is required alongside it when targeting a specific booking in a multibooking order.

"recoveryToken"

Not set

Token returned when an order is created, alongside its orderID. Required together with orderID when opening an order in a browser session other than the one that created it, for example, an order your own backend created via the API, or an order you are reopening in a new tab or after a page reload.

Not needed for an order the Checkout Widget itself created in the customer's current session, as it already has this internally.

"page"

Not set

String value.

Triggers checkout on a specific page of the checkout process such as Tickets or Checkout. Use only in combination with orderID.

Supported values:

"upgrade"/ "cross-sell" / "pickups" / "dropoffs" / "questions" / "order-questions" / "cart-summary" / ”checkout” / "package-availability"

Example: {"page": "checkout"}

📒 NOTE

If the order was created outside the browser session that is about to open it, also pass recoveryToken. orderID alone is not enough to prove your session may open it.

‼️ IMPORTANT

Treat recoveryToken like a credential — anyone with it can open and act on that order. Pass it over HTTPS and avoid logging it.


Data and Time preselection

Input

Default

Description

"dateToPreselect"

Not set

Triggers checkout with a specific tour date. Use the ISO 8601 format (YYYY-MM-DD). Use in combination with productID.

"timeslotToPreselect"

Not set

Triggers checkout with a specific tour time. Use in combination with productID.

📗 TIP

To preselect the earliest available date automatically instead, see the preselectFirstAvailableDateModalCalendar feature.


Marketing and Promotions

Input

Default

Description

"checkMarketingConsent"

Not set

If set to true, marketing consent will be pre-selected for users on the Contact Details of the Checkout page.

"referrer"

Not set

String value, for example, hilton.com.

"promoCode"

Not set

String value, an existing promotional code. Applies the code automatically.

To let customers enter a code themselves, see the promoAndGiftCardInput feature.


Checkout Features

Add these features inside the "features" object in the data-config attribute.

📒 NOTE

The default states of most features are already implemented. You only need to add a feature to the data-config if you want to change its default value or use a feature marked Not set.

Product and Unit Selection

Feature

Default

Available Values

Description

preselectFirstUnit

Not set

true / false or number

Automatically preselects the first unit of the product with a default count of 1 (true) or the specified count (number).

enableMoreDetailsToggle

Not set

true / false

Add a More Details link to expand product info like overview, highlights and FAQs.

showSkipOffersButton

false

true / false

Allows customers to skip upgrade and combination offers.


Dates, Times and Availability

Feature

Default

Available Values

Description

calendarFirst

Not set

"enabled": true / false

Allows customers to select the tour date before product selection.

preselectFirstAvailableDateModalCalendar

false

true / false

Automatically preselects the earliest available date.

restrictedTicketType

Not set

fixed / flexible

Controls which ticket date type is displayed to customers.

timePickerType

Not set

"select"

Changes the time selection interface from individual buttons to a dropdown menu.

This feature is a prerequisite to the showTourGroupsHeadlines feature.

showTourGroupsHeadlines

false

true / false

Organises timeslots into distinct tour groups, each with its own headline.

To use this feature, include "timePickerType": "select" first.

showRemainingSeats

false

true / false

Displays the number of remaining seats for the tour.


Promotions and Gift Cards

Feature

Default

Available Values

Description

promoAndGiftCardInput

true

true / false

Displays a field to enter promo or gift card code.

openGiftFlow

false

true / false

Allows the purchase of gift cards via web checkout.

disableGiftAmountInput

false

true / false

Disables the ability to adjust the per unit price of the gift card.


Waitlists and Quotes

Feature

Default

Available Values

Description

waitlistsAllowed

false

true / false

Enables the Waitlists functionality, which lets customers express interest in booking a tour on dates that are currently sold out.

quotesAllowed

false

true / false

Enables the Quotes functionality, which allows customers to postpone payment and review a booking without commitment.


Layout and Display

Feature

Default

Available Values

Description

bottomBar

true

true / false

Displays a bar at the bottom of the screen when multiple bookings are made in one order (see the multibooking input).

viewModeMap

Not set

"cross-sell": "popup" /
​"upgrade": "popup" /
​"questions": "popup" /
​"pickups": "popup"

Switches the specified page from embedded mode to pop-up mode (see the embedded input).

embeddedTitle

Not set

"buy-tickets"

Replaces the product name in the widget title with a universal Buy Tickets call-to-action in embedded mode.

Did this answer your question?