divId | Id of the element to draw into. Give it a height (the snippet uses 600px); the map is at least 400px tall. The map renders in a shadow root, so your page's CSS can't break it. |
publicKey | Your workspace public key (pk_...). |
event | Event key (ev_...). |
scrollPage | Optional boolean, default true. A plain mouse wheel and one-finger swipes scroll your page; Ctrl/⌘ + wheel or pinch zooms the map. Set false when the map fills the whole page. |
holdToken | Optional. Your own per-buyer token (8–64 chars A-Z a-z 0-9 _ -); the API rejects other tokens with 400. By default the map makes one per event and keeps it for the browser tab. |
onSelectionChange(seats) | Seats this buyer holds: [{ id, label, rowLabel, categoryId, section, price }]. price and categoryId may be null. Called on load and on every change, including seats released by expiry. |
onCheckout(seats) | Optional. When set, the map shows a cart (held seats with price, remove, subtotal, hold countdown and a "Find me N seats" picker) and a Book button with the seat count and total that calls it with the held seats. Book them on your server with the secret key and chart.getHoldToken(), then return a message to show (e.g. 'Booked 2 seats.') or throw an Error to show its message. A second press while it runs is ignored, and the map refreshes when it finishes. Without it there is no cart and no Book button. |
onHoldExpired() | The buyer's hold ran out and their seats were released. |
onError(err) | Unexpected errors (network, server). A seat someone else just took is not an error; the map shows a notice. |