gamexo developers
Booking integrations

Booking widget

Leo Cal has its own section now. This page covers building your own booking screens on the browser-key API.

Leo Cal has moved

The "Book a court" widget for a venue's own website — install, WordPress, payments, events and troubleshooting — now has a section of its own: Leo Cal. Start with the Quickstart.

If you would rather draw the booking screens yourself than use the widget, the rest of this page is for you.

Building your own

Leo Cal is a thin client of four calls on the gamexo API, all made with a browser key (gxp_…) — the same key the widget runs on:

CallWhat it is for
GET /widgetThe venue, its branches, sports and courts, its booking rules, and whether and how it can take payment online.
GET /availabilityFree slots, with a GST-inclusive price per slot. Takes branch_id, sport_id, court_id and duration_min.
POST /checkoutHold a court and open a payment for it. Takes the court, the start time, the length and the customer's name, phone and email — never a price.
POST /checkout/{id}/completeConfirm the booking, with the payment id and signature the gateway handed the browser.

A browser key can call nothing else. How the payment itself works — the 15-minute hold, the signature check, the webhook and the automatic refund — is the same as for the widget, and is described in Leo Cal → Payments.

Keep to the browser key

Do not call these with a secret key (gx_…) from a page. A browser key is built to be public; a secret key is not. See Leo Cal → Security.

On this page