Guides & product help, fjellride.se

Back to Integrations & API

Embeddable booking widgets

Add a Book now button to your own website so customers can book and pay without leaving your page. No code required.

What booking widgets are

A booking widget is a small Book now button you embed on your own website: WordPress, Squarespace, Wix, Webflow or a hand-built HTML page. When a visitor clicks it, your live availability and checkout open in a window on top of your page. The customer picks dates and pays without being sent away, and the booking lands in Fjellride straight away.

Widgets are the no-code alternative to the Fjellride API. If you can paste a line of HTML, you can take bookings from any site.

How it works

  1. You create a widget in Settings → Widgets (in the Sales channels group) and choose what it should book.
  2. Fjellride generates a snippet: a <div> plus a <script> tag.
  3. You paste that snippet into your website wherever you want the button to appear.
  4. Visitors click the button, book and pay in the window. Payment runs through the same secure Stripe checkout as your storefront.

Creating a widget

The Widgets page in Settings
The Widgets page in Settings
  1. Go to Settings → Widgets
  2. Click Create widget
  3. Under What to embed, set up the button:
    • Type: choose Button. Calendar and product-grid widgets are coming soon.
    • Product: pick a single product, or choose Entire catalogue so the customer browses everything you offer.
    • Button label: the text on the button, like "Book now" or "Rent a bike". A live preview updates as you type.
  4. Under Where it will be used, tell Fjellride about the site:
    • Name: a label for your own reference, like "Main website" or "Bike rental landing page".
    • Website origins: the domains where the widget is allowed to run, like https://www.yourshop.com. This is the widget's security boundary (see Security below).
  5. Click Create. Fjellride shows your embed snippet, ready to copy.
The guided create-widget dialog, with the type, product, label, and preview
The guided create-widget dialog, with the type, product, label, and preview

Adding the snippet to your site

Copy the generated snippet and paste it into your site's HTML where you want the button to show. It looks like this:

html
<div
  data-fjellride-widget="button"
  data-org="your-org"
  data-key="fjw_pk_live_xxxxxxxxxxxxxxxx"
  data-product-id="prod_xxxxxxxx"
  data-label="Book now"
></div>
<script async src="https://embed.fjellride.se/embed/v1/embed.js"></script>
  • The <div> is the placeholder where the button is drawn.
  • The <script> loads the Fjellride loader. You only need one script tag per page, even if you have several buttons.
  • data-product-id is left out when the widget books your entire catalogue.

Platform notes

  • WordPress: add the snippet with a Custom HTML block in the block editor, or inside a "Custom HTML" widget. Avoid the visual editor, which can strip <script> tags.
  • Squarespace: use a Code block, or Settings → Advanced → Code Injection for site-wide placement.
  • Wix: use the Embed HTML / Custom Element widget.
  • Webflow: use an Embed element.
  • Plain HTML: paste it anywhere in the page <body>.

Booking your whole catalogue or a single product

  • Choose a single product when the button should book one specific item, like a "Book this e-bike" button on that product's page.
  • Choose Entire catalogue when customers should browse and pick from everything, like a general "Book now" button in your site header.

You can create as many widgets as you like and place different buttons on different pages. They can all share the same widget key.

Product pages inside the widget

The booking window works like your storefront's booking page. Each gear card has a More info link that opens the product's own page, with the full description, photos and Add to booking, without leaving the window. Back to gear returns to the list.

Checkout works the same way too. Renters answer your checkout custom fields and, if you've published policies, tick that they've read them, with each policy opening in a sheet inside the window. On a phone, they can swipe between product pages.

Links with dates and gear filled in

The widget always opens on an empty trip. If you want to send renters to a booking that already has dates, a pickup place and gear in it, for example from a newsletter, use a booking link to your storefront instead. See Getting found: search engines, sharing and booking links.

Re-opening the embed code

Need the snippet again, or want a button for a different product using the same key?

  1. Go to Settings → Widgets
  2. Open the ⋯ menu on the widget
  3. Choose Get embed code

From there you can copy the key or generate a fresh snippet, pointed at a different product if you like, without creating a new widget.

Security: how widget keys stay safe

Widget keys start with fjw_pk_live_ (or fjw_pk_test_ for testing). The pk stands for publishable. Like a Stripe publishable key, it's meant to be visible in your page's source code. That's normal and safe.

What stops a widget key from being misused is the website origins list you set when creating it. Fjellride only accepts widget requests from a domain you've listed. If someone copies your key onto another site, it won't work.

Payments

Widget bookings are paid through the same Stripe checkout as your Fjellride storefront, so deposits, balances, refunds and payouts all work the same way. You must have Stripe connected before customers can pay through a widget.

When the customer reaches payment, the secure Stripe page takes over the browser tab to complete the payment, then returns them to the booking confirmation.

Troubleshooting

  • The button doesn't appear. Check that both the <div> and the <script> tag were pasted, and that your site builder didn't strip the <script>. Use a raw HTML or code-embed block rather than the visual editor.
  • Clicking does nothing, or the browser console shows an error about the origin. The page's domain isn't in the widget's website origins. Add it in Settings → Widgets.
  • "Book now" opens but no products show. Check that the widget points at a published product, or switch it to Entire catalogue.
  • The widget says there are no booking locations. Every location is staff only. Turn on Show on storefront for at least one location.
  • Customers can't pay. Make sure Stripe is connected for your organization.