Skip to content

Common configuration properties

Common configuration properties

Overriding the configuration dynamically

It is possible to change change the configuration dynamically by using the window.BilberryWidgetsGloablOverride JavaScript function.

E.g:

window.BilberryWidgetsGlobalOverride({
bilberryAccessToken: '<<BILBERRY CLIENT API ACCESS TOKEN>>';,
bilberryBaseApiUrl: 'https://<<NAME OF YOUR BILBERRY INSTANCE>>.bilberry.no',
});

Note! This function is only available after the page has fully loaded all remote files (after the window’s “load” event has fired).

Opening date

If your product(s) are open for booking, but the first bookable date is far in the future, you can default the start date in search forms / booking widget to the first bookable date. To do this, add the following line to your configuration:

window.BilberryWidgetsGlobal.openingDate = '2025-06-09';

The format of the date above is YYYY-MM-DD.

Limit max persons in search forms

You can set a max limit of how many people the user can add when searching for Accommodations or Activities. This provides the user with a better user-experience, as you can ensure they will not perform searches which would exceed the maximum capacity of your products.

To add this limit, set the following configuration option, changing the number as required:

window.BilberryWidgetsGlobal.personsMax = 10;

Payment provider

By default, Nets is the payment provider being used by the widgets. However, Stripe is also supported.

Stripe

If using Stripe as a payment provider you need to add this code to the main configuration:

window.BilberryWidgetsGlobal.paymentProvider = 'stripe';

Invoice payments

If you wish to allow payments using invoices for companies, add this code to the main configuration:

window.BilberryWidgetsGlobal.enableInvoicePayment = true;

Please note that invoicing does not yet work with Bilberry Timeslots, only activities and accommodations are supported.

Custom increments for gift card purchases

If you would like to use your own increments in the gift card purchase widget, you can set these intervals like so:

window.BilberryWidgetsGlobal.giftCardPriceIncrements = [10, 25, 50, 100];

For usability reasons, you should not add more than 4, although it is possible. Feel free to use fewer increments.

The prices are in the currency configured in your Bilberry instance.

Hiding VAT-information from the summary

In some countries there are special rules, and potentially undetermined tax rates at the time of purchase. To accommodate this, you have the option to hide away the VAT-information from the summary by setting the following configuration flag:

window.BilberryWidgetsGlobal.hideVat = true;

To set a custom logo for the widgets, displayed in the checkout, add the following line to your configuration:

window.BilberryWidgetsGlobal.logo = 'https://mypage.com/mylogo.png';

Including closed availability for waiting list functionality

When tours reach capacity on the backend, they are automatically closed. However, to enable waiting list functionality, you need to allow these closed tours to still be visible and bookable for waiting list signups.

To enable this feature, add the following configuration:

window.BilberryWidgetsGlobal.includeClosedAvailability = true;

When enabled, this will:

  • Allow fetching of closed tours from the API
  • Display closed tours (that have waiting list activated) in calendar views and product lists
  • Show visual indicators for waiting list availability

Note: This feature is specifically designed for waiting list functionality. Closed tours will only be shown if they have waiting list enabled on the backend.

Membership and timeslots

To set up the use of membership and timeslot widgets, you need to add the following configuration:

window.BilberryWidgetsGlobal.loginRedirectUrl = 'https://mypage.com';
window.BilberryWidgetsGlobal.companyKey = 'mycompany';
window.BilberryWidgetsGlobal.siteKey = 'mysite';
window.BilberryWidgetsGlobal.auth0Domain = 'mycompany.eu.auth0.com';
window.BilberryWidgetsGlobal.auth0ClientId = 'myclientid';
window.BilberryWidgetsGlobal.auth0Audience = 'https://mycompany.bilberry.app';

You can find the information needed in the Bilberry backoffice application.

For now, you will need to get the Auth0 information directly from the Auth0 dashboard.

Advanced JavaScript API

For programmatic control of basket visibility and cart operations (opening/closing basket, clearing cart), see the JavaScript API documentation.