Vexbo

Integration

Install & integrate

Use the hosted embed, the booking widget script, headless HTTP from your stack, or the npm package (same UMD bundle as the hosted script).

Cross-origin widget script

If the widget script runs on a site other than your Vexbo deployment, set data-api-url and data-embed-url to your Vexbo host, and configure WIDGET_ALLOWED_ORIGINS on the server. See sdk/README.md in the repo for troubleshooting (Network tab, CORS, and error codes).

Option A. Hosted embed (fastest)

Ship a full booking UI without building forms: open /embed/[tenant_id]?key=zentier_publishable_…&widget=WIDGET_CONFIG_ID in an iframe or new window. Optional query params depend on your widget configuration.

iframe example
<iframe
  src="https://www.vexbo.se/embed/YOUR_TENANT_ID?key=zentier_pk_live_xxx&widget=YOUR_WIDGET_ID"
  width="100%"
  height="720"
  style="border:0;border-radius:12px"
  title="Bookings"
></iframe>
<p style="margin-top:8px;text-align:center;font-size:12px;opacity:0.65">
  Online booking powered by <a href="https://www.vexbo.se" target="_blank" rel="noopener">Vexbo</a>
</p>

Theme and copy are controlled from the dashboard under widget settings. See Widget & styling.

Option B. Booking widget script (customer sites)

Load /sdk/booking-widget.js from your Vexbo origin with data-tenant, data-key, optional data-widget-config, and on third-party pages data-api-url / data-embed-url pointing back at Vexbo.

Script tag (embed on another domain)
<script
  src="https://www.vexbo.se/sdk/booking-widget.js"
  data-tenant="YOUR_TENANT_ID"
  data-key="zentier_pk_live_xxx"
  data-widget-config="YOUR_WIDGET_ID"
  data-api-url="https://www.vexbo.se/api"
  data-embed-url="https://www.vexbo.se"
></script>

Option C. Custom UI (headless)

Call widget endpoints from your app: list availability with GET /api/widget/availability, create bookings with POST /api/widget/booking, and redirect customers to the Mollie payment page when the API returns a checkout URL.

Minimal fetch (availability)
const params = new URLSearchParams({
  key: process.env.NEXT_PUBLIC_VEXBO_PUBLISHABLE_KEY,
  resource_id: resourceId,
  start_date: '2026-06-01',
  end_date: '2026-06-30',
})
const res = await fetch(`${process.env.NEXT_PUBLIC_APP_URL}/api/widget/availability?${params}`)
const data = await res.json()

Secrets

Never put a zentier_server_secret_ key in frontend code. Server-only routes belong on your backend.

Environment variables (typical)

  • NEXT_PUBLIC_APP_URL. origin of this Vexbo deployment (used in links and client-side fetch).
  • NEXT_PUBLIC_VEXBO_PUBLISHABLE_KEY. your publishable key for browser/widget calls (name is your convention; not required by the framework).
  • WIDGET_ALLOWED_ORIGINS. optional comma-separated origins for widget CORS at the deployment level. Tenants can also register origins under Settings → Widget embed apps.