gamexo developers
Leo Cal

Security

What a browser key can and cannot do, why the widget runs in a frame, and what to do if a key leaks.

A booking widget has an awkward job: it runs in a visitor's browser, so everything about it — including the key it uses — is public. Leo Cal is designed on the assumption that anyone can read your page's source, and that is safe.

Browser keys and secret keys

You can issue two kinds of key from Settings → Integrations → Your own website or app:

Browser keySecret key
Starts withgxp_gx_
Lives inYour website's JavaScriptYour server, never a browser
Safe to publish?YesNever
Can read availabilityYesYes
Can start a checkout (which your gateway must complete)Yesn/a
Can create a booking without payingNoYes
Can list bookings or read customer detailsNoYes
Can cancel a bookingNoYes

Neither key can name a price: the amount is always worked out by the API from your own rates. A browser key can call exactly four endpoints and nothing else: read the venue's widget setup, read availability, start a checkout and complete one. Even if someone copies it from your page and writes their own code, the most they can do is what the widget already does — look at free slots, or start a payment that only your gateway can complete with real money.

Never publish a gx_ key

A secret key can read your bookings and customer list and cancel bookings. If one has been pasted onto a website — including into the WordPress plugin, which refuses it — rotate it from the dashboard straight away. The old key stops working immediately.

Allowed website addresses

When you create a browser key you list the addresses it is allowed to be used from. Two things use that list:

  1. The widget refuses to draw itself on any other site. The key is public, so somebody else could paste your snippet onto their page. The booking frame checks which page embeds it and, if it is not one of yours, shows a polite refusal instead of your venue's booking page.
  2. Browsers throw away the API's replies to unlisted sites. Cross-origin requests from an address not on the list are not honoured, so your key does not work from a page you have not approved.

Addresses are matched exactly, scheme and all: https://yourvenue.com and https://www.yourvenue.com are two addresses, as are http:// and https://. List each one your site answers on.

This is not a security boundary, and is not written as one

Anything that is not a browser — a script, curl — sets its own headers and can claim to be any site. The origin list keeps your booking page on your sites; it does not protect your money. What protects your money is that prices and payment are checked by the API, not by the browser, and a booking is confirmed only on a verified payment.

Why it runs in a frame

Both the card and the pop-up are iframes of cal.turfleo.com. That gives you:

  • Your page cannot reach in. Your scripts, extensions and CSS cannot read the form, restyle the fields or intercept what the customer types.
  • The widget cannot reach out. It reads nothing from your page — not your cookies, your forms or your other scripts.
  • The payment runs on our domain. Card details are entered in your gateway's own window; they never touch your website's page.

The booking page only sends messages to the verified address of the page that embedded it — never to * — and the loader only accepts messages from its own origin and from frames it created.

What customers' data goes where

DataWhere it goes
Name, phone, emailTo your venue's gamexo account, as a customer record, after payment clears
Card, UPI or bank detailsTo your payment gateway, never to us or to your website
Which slot they choseTo your venue's bookings

On WordPress, none of it passes through WordPress. The plugin only holds the browser key.

If a key leaks

For a browser key, the exposure is small by design — but if a copy is being abused (for example, spam checkouts), act in this order:

  1. Revoke the key (Settings → Integrations → Your own website or app → the key → Revoke). It stops working immediately. You can re-enable it later.
  2. Rotate it to get a new one, and paste that into your site. The old one is dead the moment you rotate.
  3. Check Bookings for anything unfamiliar. Unpaid checkouts expire and release their court after 15 minutes without anyone touching them, so abuse does not strand inventory.

For a secret key, rotate first and investigate afterwards.

On this page