Chauffeur Circle Docs

Widget

Embed modes

The widget is one script tag. It shows your vehicles and prices, takes the booking and the card, and sends the emails. Copy your code from Widget in the dashboard: it already contains your key.

Mode What passengers see Plans
inline The full booking form in your page All
quote_box A compact trip form; prices and the rest of the booking open in a dialog Pro, Business
popup A button that opens the form in a dialog Pro, Business
iframe The form on a Chauffeur Circle page inside an <iframe> Pro, Business

A mode your plan does not include shows the inline form instead.

Inline

<div id="book"></div>
<script async src="https://cdn.chauffeurcircle.com/v1/loader.js"
  data-key="cc_pk_live_…"
  data-target="#book"
  data-mode="inline"></script>

Quote box Pro · Business

<div id="quote"></div>
<script async src="https://cdn.chauffeurcircle.com/v1/loader.js"
  data-key="cc_pk_live_…"
  data-target="#quote"
  data-mode="quote_box"></script>
<script async src="https://cdn.chauffeurcircle.com/v1/loader.js"
  data-key="cc_pk_live_…"
  data-mode="popup"
  data-label="Book a ride"></script>

<!-- Or open it from any button of your own -->
<button type="button" onclick="ChauffeurCircle.open()">Book now</button>

iframe Pro · Business

For site builders that do not allow scripts. The frame grows with its content when the page listens for its height (see below); otherwise give it a fixed height.

<iframe src="https://api.chauffeurcircle.com/embed/cc_pk_live_…"
  title="Book a ride" allow="payment"
  style="width:100%;height:760px;border:0"></iframe>

To let the iframe resize itself, add:

<script>
  addEventListener('message', (e) => {
    if (e.origin === 'https://api.chauffeurcircle.com' && e.data?.type === 'chauffeur-circle:height') {
      document.querySelector('iframe[src*="/embed/"]').style.height = e.data.height + 'px';
    }
  });
</script>

Loader options

Attribute Values Default
data-key Your publishable key required
data-mode inline, quote_box, popup inline
data-target CSS selector of the element to put the widget in right after the script
data-service point_to_point, airport, hourly: the tab selected first first service
data-theme light, dark your dashboard setting
data-label Popup button text Book a ride

The loader adds window.ChauffeurCircle with ChauffeurCircle.open() (opens the popup) and ChauffeurCircle.payments.mount() (see Custom forms).

Allowed domains

The widget only works on the domains listed on your key in API keys. If you see "This website is not allowed to use this API key." (error code origin_not_allowed), add the domain exactly as it appears in the address bar (with or without www), or a wildcard such as *.yourlimo.com.

Versions

/v1/loader.js always serves the latest 1.x widget, with fixes and improvements but no breaking changes. See Changelog & versioning.

Browser support

The widget works in current versions of Chrome, Safari (macOS and iOS), Firefox, Edge and Android browsers. It uses standard web components, so it works the same on any website or framework. Internet Explorer is not supported.

Sites with a Content Security Policy

If your site sends a Content-Security-Policy header, allow Chauffeur Circle's hosts:

Directive Add
script-src https://cdn.chauffeurcircle.com
connect-src https://api.chauffeurcircle.com
frame-src https://pay.chauffeurcircle.com https://api.chauffeurcircle.com
img-src https://api.chauffeurcircle.com (vehicle photos and logos)

Google address search, when enabled, also needs https://maps.googleapis.com in script-src and connect-src.