Event Tickets¶
Sell a fixed number of tickets for an event, give every buyer a QR code per person, and scan those codes at the door with the Badger app. This is phase 1: general admission, one occurrence per product. Allocated seating, recurring events and offline scanning are out of scope.
How it's modelled¶
- An event is a product with the Event Ticket product type (
eventTicketdecorator). One product per occurrence: a Friday and a Saturday show are two products. - Ticket types are variants: Adult / Child / Concession, or Standard / VIP. A product without variants is a single ticket type.
- Capacity is stock. Each ticket type is its own SKU, so "100 adult tickets" is 100 in stock on the Adult variant (set on the product's Stock tab). A ticket order can't oversell: the stock is taken before payment is captured, and an order for a sold-out type is refused and its card hold released (see Dispatch, Cancellations & Returns).
- One ticket per person admitted. Quantity 3 on a line is 3 tickets, each with its own code. A
"family ticket" variant can admit several people with one code (
admitsPerTicket). - Tickets never need shipping. They can't be returned; refund the order instead, which voids them.
Each ticket is its own record (Ticket), holding ids only: the order, the line, the event and the
ticket type. It holds no name or email address. The QR code reads BDGRT1: followed by a 32-character
code made from the ticket id with the site's ticket secret. Only a hash of the code is stored, so a
copy of the database can't be turned into working tickets.
Operator view (the admin)¶
Setting up an event¶
-
Products › New product. On the Settings tab, set Types to Event Ticket. The Event panel appears:
Field Meaning Starts Required before tickets can be sold. Entered in the shop's time zone (see below). Ends Optional. Without it, the door treats the event as running 12 hours. Venue Shown on the ticket and in the confirmation email. Check-in opens Minutes before the start that scanning opens (default 120). Earlier scans are turned away as too early. Sales close Minutes before the start that tickets stop selling. Leave it empty to keep selling until the event ends, so the door can still sell. People per ticket How many people one ticket admits (default 1). A variant can override it with its own admitsPerTicketattribute.Time zone. Event times are entered and shown in the shop's time zone, set under Settings › Site identity › Time zone (or
manageBranding setIdentity timeZonethrough MCP, or by a platform operator on System › Tenants). The panel says which zone it is using ("Times are in Europe/London") with a link to the setting. A shop with no zone gets the one its language implies (en_GB is Europe/London); with neither, Europe/London is assumed and the panel shows that as a warning, so a shop elsewhere sets its zone before selling. Changing the zone later doesn't move events already saved: each keeps the moment it was saved as. The same zone sets the scan app's "today", the POS day and admin dates (ShopZonesincommon; see Dates and time zones).Dates are stored as ISO-8601 with the site's offset, in the product attributes
eventStart,eventEnd,eventVenue,checkInOpensMinutesBefore,ticketSalesCloseMinutesBeforeandadmitsPerTicket. The Event panel owns those attributes, so the Custom attributes editor doesn't list them.The panel checks its fields as you type: the end must be after the start, the minutes must be whole numbers of 0 or more, and people per ticket a whole number of 1 or more. A bad field gets its error underneath, and Save takes you to it instead of saving. The server applies the same rules: if it refuses the event details, nothing is saved (not even the product's other changes), and the editor comes back with what you typed and the error on the field.
-
Add variants for the ticket types and set the stock for each on the Stock tab. Name a type for who it's for ("Adult", "Under 18"), not its price: the name is printed on every ticket, and when the types cost different amounts the product page shows each one's price on its button.
- Make the product live.
Don't put the date in the product name: the product page and the listing cards show it (see
Buyer view). Choosing Event Ticket for a product without a page template of its own
moves it onto the eventProduct page template when you save, which carries the event details. A
product you gave another page template keeps it; add the Event details (eventDetails) extension
to that page template's variantDisplay area to show them there. Sites created before this existed get
the page template from the Event details on event pages platform upgrade (Settings › Platform
upgrades), which also moves their existing events onto it.
Ended events drop out of collection pages and search. To keep them listed, turn off Hide Ended
Events under Settings › Store and storefront › Events (hide-ended-events). Their product pages keep working
either way.
Attendance¶
Orders › Event tickets (/admin/tickets/events) lists every event: when it is, whether it's on
sale, tickets issued and how many are checked in. Events with no start come first (they can't be
sold yet), then upcoming ones, then past ones. An event's product page links to its attendance too
(the Attendance button).
The attendance page for one event shows:
- Totals: tickets issued, people (family tickets count each person), checked in, still to arrive, and void.
- By ticket type: the same counts per type, including types since removed from the product.
- The ticket list: order number and ticket number, the buyer's abbreviated name (see Recognising the holder), ticket type, status (Not checked in, Checked in, Void), when it was checked in, by whom and on which device. Filter by status, or search by order number, the last four characters of the code, a full scanned code, or the buyer's name or email address (see Finding a lost ticket).
- Actions on each ticket:
- Check in: a manual check-in for someone whose phone has died. It ignores the check-in window, because staff have decided to let them in.
- Undo check-in: corrects a mis-scan.
- Void: the ticket stops working. Voiding doesn't refund the order or put the ticket back on sale. Refund the order to give the money back, and add stock to sell the place again.
- Download CSV: every ticket for the event (order, ticket, name, type, admits, status, the code's last four characters, issued, checked in, by whom, device, voided, reason), for a spreadsheet or a printed door list.
The attendance pages are for Admin and Superadmin, the roles that can see orders. Tickets themselves hold no customer details; the buyer's abbreviated name is read from the order when shown.
Refunds and cancellations void tickets automatically: cancelling an order voids all its tickets; a full refund voids them all; a refund naming a line and a quantity voids that many of the line's tickets, unused ones first. A part refund that names no line voids nothing, so void the right tickets here by hand.
Letting staff scan¶
**Settings › › ** (/admin/shopSettings/pos-staff; see POS staff)
sets what each person with the POS Agent role can do in the Badger app. Switch on Check in
event tickets for door staff.
They don't need to take payments to scan. Administrators can scan without a profile. See
Mobile POS.
Through MCP¶
An AI agent connected to the shop's MCP server can set up and follow events:
manageProductswithproductTypeDecorators: ["eventTicket"]and aneventobject (start,end,venue,checkInOpensMinutesBefore,salesCloseMinutesBefore,admitsPerTicket;""clears a field). Creating an event ticket product needsevent.start, and it defaults to not needing shipping. Unless the call passes astereotypeId, a product that becomes an event without a page template of its own getseventProduct.eventDetailsis configured like any other extension (extensions getSchema eventDetails, and theplacementreference section):showVenue,showDoorsOpen,showStatusandshowCalendarLink, all on by default. It has no text of its own to set.tickets(read):listgives every event with its tally;get(skuId) gives the tally per ticket type and a page of tickets (order number, type, status, checked-in time), filtered bystatus. It doesn't return the codes or their last four characters.
Buyer view¶
Finding an event¶
- The product page shows the event details panel (
eventDetails) under the price, above the ticket types:- When, in the shop's time zone and language: "Saturday 14 November 2026, 7:00pm to 10:30pm". With no end it shows the start only; over several days it names both days ("Friday 13 November 2026, 7:00pm to Sunday 15 November 2026, 5:00pm"); an end before 6am the next day reads as the same night ("8:00pm to 1:30am").
- Doors open: the time check-in opens, when the check-in window is more than 0 minutes.
- Where: the venue.
- Ticket status: Tickets on sale, Sold out (every ticket type's stock, read from the inventory service, is at 0; untracked stock never runs out), Ticket sales have closed, or This event has ended. Once sales have closed or the event has ended, Add to basket is switched off.
- Add to calendar: an
.icsfile (/events/{skuId}/calendar.ics) with the start, end, venue and a link back to the page. Not offered once the event has ended.
- Listing cards (collection pages, search results, category pages and the product rails of the Brock-family themes) show a compact date line and the venue under the name: "Sat 14 Nov 2026, 7:00pm" or "Fri 13 Nov to Sun 15 Nov 2026". An ended event that is still listed is marked Ended.
- Ended events are left out of collection pages and search unless the shop turns that off (see Setting up an event). Listings catch up within five minutes of an event ending; search immediately.
- Search and category pages offer an Event date sort, soonest first, when the results include events.
- Search engines get a schema.org
Eventfor each event page, with an offer per ticket type (see SEO Structured Data).
Buying¶
- The basket and checkout work as for any product. Tickets can't be added once sales have closed or after the event has ended.
- After payment, the order confirmation page shows one card per ticket: the QR code, event, date and time, venue, ticket type, "Ticket 2 of 4" and the code's last four characters, for reading out if the QR won't scan. The date and time read as on the listing cards ("Sat 14 Nov 2026, 7:00pm"), here, in the email and in My account.
- The confirmation email shows the same tickets and links to the confirmation page.
- Signed-in buyers see the same cards on the order in My account.
- The QR image is served only to someone holding the order's confirmation link, and a voided ticket's image is no longer served.
- Each ticket card, on the page and in the email, has Add to Apple Wallet and Add to Google Wallet buttons once the platform has those wallets set up. A button whose wallet isn't configured doesn't appear. The plain-text email lists the same links.
Door staff view (the Badger app)¶
- Sign in with a POS agent account that has Check in event tickets, and open Scan tickets on the Sell screen.
-
Pick the event. The list shows today's events and the next two days' (the Door App Days Ahead setting under Settings › Store and storefront › Events,
ticketing-app-lookahead-days, at most 31; 0 shows today's only), earliest first. An event whose check-in hasn't opened yet is listed as upcoming with the time its door opens, so staff can see it's there; scans before that time are still turned away as too early. The choice stays for the session."Today" is worked out in the shop's time zone. On a shop whose zone is UTC, just after midnight in a UK summer it is still the day before, which is why the list looks ahead rather than showing today alone. 3. Scan each code with the camera or a hardware scanner. The screen shows the result in large colours: - Green, admitted, with the ticket type and how many people it admits. - Amber, already checked in, with the time and who scanned it. That's the sign of a copied ticket. - Red for a void ticket, an unknown code, or a ticket for another event (with that event's name, so the holder can be redirected). A wrong-event ticket isn't checked in. - Scans before check-in opens, or after the event has ended, are refused with the reason. 4. The header keeps a running tally (checked in / issued). Undo last reverses a mis-scan, and a manual lookup finds tickets by order number, the code's last four characters, or the buyer's name or email address (see Finding a lost ticket).
Finding a lost ticket¶
When someone has lost their ticket ("the name's Smith"), type their name or email address into the manual lookup. The lookup:
- matches the person who bought the tickets: the first name, last name and email address on the order. Tickets don't carry attendee names, so a guest who didn't buy their own ticket is found under the buyer's name;
- needs every word typed to match, ignoring capitals: "jane smith" finds Jane Smith but not John Smith, and part of a name or address is enough ("smi" finds Smith);
- ignores words of one letter, so typing "J" alone finds nothing. Type at least two letters. Words with no letters (an order number) are matched as order numbers, not names;
- searches only the orders that hold tickets for the chosen event, never the shop's other orders;
- lists order-number and code matches first, then name matches, at most 50 tickets.
Each ticket found shows only the buyer's first name and surname initial, as in Recognising the holder. The lookup never shows the email address or the full surname, and doesn't say whether the name or the email matched, so check the person in front of you (for example, ask for the order confirmation email) before admitting them. Name searches have their own, lower per-minute limit (see Security notes).
In the API, names and email addresses are only searched by POST /v1/tickets/search, which takes the
search in the request body so it never appears in a web address (and so never in proxy or CDN logs).
GET /v1/tickets/lookup finds tickets by order number, the code's last four characters or a full
code only; anything else typed there simply finds nothing. Both answer with Cache-Control: private,
no-store.
Two devices scanning the same ticket at the same moment can't both admit it: the check-in is one conditional update, and exactly one of them gets "admitted". The app needs a connection; without one it says the ticket wasn't checked in rather than queuing the scan. The scan API is in the API Reference under the Tickets tag.
How the storefront side is built¶
EventDisplayService(commerce-core,ticketing) builds everything a shopper sees: the panel (EventPageView), the state, the ticket types with stock, the.icsfile and the cards' helper.EventDateFormatterformats dates and times in Java, so templates only print strings.EventDetailsExtension(eventDetails) puts the panel on the model; the templates aretemplates/nova/extensions/eventDetails/eventDetails.html(every theme uses Nova's), styled by.nova-event-detailsinbdgr.css.EventCardsInterceptorputseventCards(EventCards, a formatter that makes no calls) on every page; every card includesfragments/eventCardLinewith${eventCards.of(product)}.EventCalendarControllerserves the.ics;EventStructuredDataInterceptoradds the JSON-LD.EventStereotypesowns theeventProductpage template;EventPagesUpgrade(2026.10-event-pages) adds it to existing sites.-
Listings:
ProductService.savecopies the event's start and end intoProduct.eventStartsAtandeventEndsAt, whichfindListableBySiteAndCollectionIDsfilters on. The search index haseventEndsAt(every document; non-events never end) andeventStartsAt(events only), product index revision 10;MerchandisingQueryServicefilters and sorts on them and falls back to listing everything on an index built before they existed. -
Order pipelines:
ReserveTicketStockProcessor,IssueTicketsProcessorandVoidTicketsProcessorare dispatchers over theBookableKindseam; tickets are itsEventTicketKind. See Bookable kinds.
Recognising the holder¶
So staff can recognise someone who forgot their ticket, a ticket shows the buyer as first name and the initial of the surname ("Chris K."), never the full name. It appears on:
- the attendance list and CSV (staff only);
- the scanner API:
holderNameon a scan result, a manual lookup and a search (TicketSummary), including a search by the buyer's name or email address; - the ticket card on the order page, in the order email, and on the Apple and Google Wallet pass.
The name is read from the order's customer details when it's shown, not stored on the ticket, so erasing the customer removes it too. An order with no name shows none. The QR code carries no name.
Searching by name or email address (see Finding a lost ticket) reads the same order details and changes nothing about what is shown: a match still shows only the abbreviated name. What staff type is personal data, so it is never written to the shop's logs.
Security notes¶
- The site's ticket secret (Settings › Event tickets,
ticketing-signing-secret) is created on first use and is never copied by site data transfer. Changing it makes every ticket already issued unscannable, so only do it if the secret has leaked. - Log lines name tickets, orders, events and sites by id only. Codes, and the text typed into a manual lookup (which can be a name or an email address), are never logged.
- Manual lookups are rate-limited per staff member and shop, so a stolen staff sign-in can't be used
to guess codes or list an event's buyers: 20 lookups a minute
(
badger.tickets.rate-limit.lookup-per-minute), of which at most 8 may search buyers' names and emails (badger.tickets.rate-limit.name-lookup-per-minute). BothGET /v1/tickets/lookupandPOST /v1/tickets/searchcount towards the first; only a search that reaches buyers' names (not an order number or a full code) counts towards the second. Past either limit the app is told to wait a moment. A refused name search is logged with the staff member's, shop's and event's ids only. If the limit store (Redis) is unreachable, lookups are allowed rather than stopping the door. The admin attendance page isn't rate-limited: it is for Admin and Superadmin only. - The admin attendance page's search box still uses the page address (
?q=), like the admin's other list searches, so a name typed there is in that admin's browser history and the request line.
Wallet passes¶
Every ticket can go into Apple Wallet and Google Wallet. The pass shows the event, its date and time
(in the shop's time zone), the venue, the ticket type, "1 of 3", how many it admits, and the same QR
code as the ticket (BDGRT1:<code>, with the short code beneath it). Passes take the shop's name,
its logo and its colour.
- Colour (
PassColours, shared with the in-store card): the primary colour of the shop's design brief if it has saved one; otherwise its email brand colour, if the shop set one; otherwise its theme's brand colour (Depot amber, Brock green, and so on; a layered theme without one takes its base theme's); otherwise the Nova indigo. Text is white or near-black, whichever reads on it. - Logo (Apple): a PNG, JPEG or GIF logo is used as it is, and an SVG logo is drawn as an image
(
SvgLogo, with no external files, links or entities). The logo image is only as wide as the logo (50pt tall, at most 160pt wide), so the shop's name sits beside a square or squat logo (an initial on a tile) and is left out only beside a wide wordmark that already says it. Without a logo, or one that can't be fetched or drawn, the pass shows a plain icon and the shop's name. Google Wallet fetches the logo itself from the logo's URL and doesn't take SVG, so a shop with an SVG logo shows Google's lettered placeholder there.
| Link | What it does |
|---|---|
/o/{orderId}/{code}/tickets/{ticketId}.pkpass |
The signed Apple Wallet pass (application/vnd.apple.pkpass). iPhone and Mac Safari open it in Wallet; other browsers download it. |
/o/{orderId}/{code}/tickets/{ticketId}/google-wallet |
Redirects to Google's "Save to Google Wallet" page. The signed link is made on demand, so the email carries a short URL. |
Both are authorised like the QR image, by the order's confirmation code. A wrong code, another order's or another shop's ticket, a void ticket, and a wallet that isn't configured all get a 404.
Passes aren't updated after they're added. There's no Apple pass web service in this phase, so a pass in Apple Wallet stays as it was. That's safe: the door checks every scan on the server, so a pass for a voided ticket doesn't admit. When Google Wallet is configured, voiding a ticket (refund, cancellation or by hand) also marks its Google pass inactive, in the background; a pass the buyer never saved is skipped.
Setting up (superadmin, once for the platform)¶
The credentials are platform-wide: one Apple Pass Type ID and one Google issuer serve every shop, for
ticket passes and for customers' in-store cards.
A shop can use its own Apple Pass Type ID instead.
The shared pieces (the settings, signing, images and the Google client) are in the wallet package;
each kind of pass writes its own content. In-store cards are Google generic passes, so the issuer
needs publishing access for generic passes as well as event tickets before customers outside the
issuer's test accounts can save one.
Enter them in System › Global configuration (/system/globalSettings/configuration). Each key is
listed there with a description, even before it's set. A wallet's buttons appear once all of its keys
are set and readable; a key that can't be read is logged as a warning naming the key, never its
value.
Apple Wallet (needs a paid Apple Developer Program membership):
| Key | Where it comes from |
|---|---|
apple-wallet-pass-type-id |
Apple Developer › Certificates, Identifiers & Profiles › Identifiers › Pass Type IDs: register one, e.g. pass.uk.co.bdgr.tickets. |
apple-wallet-team-id |
The account's 10-character Team ID (Apple Developer › Membership details). |
apple-wallet-certificate (secret) |
On the Pass Type ID, Create Certificate from a CSR made in Keychain Access. Install the .cer, export the certificate with its private key from Keychain Access as a .p12, and paste the output of base64 -i pass.p12. |
apple-wallet-certificate-password (secret) |
The password chosen when exporting the .p12. |
apple-wallet-wwdr-certificate |
Apple's WWDR intermediate that issued the certificate (G4 for certificates made since 2022), from apple.com/certificateauthority. Paste it as PEM (openssl x509 -inform der -in AppleWWDRCAG4.cer) or as base64 of the .cer. |
The pass certificate lasts a year. When it expires the Apple button disappears (and a warning is
logged) until a new .p12 is entered.
A shop's own Apple Pass Type ID¶
Apple Wallet stacks every pass that shares a Pass Type ID. On the platform's one ID, a customer who
holds in-store cards (or tickets) from several Badger shops sees them in one pile, not as separate
cards. A shop that wants its passes kept apart sets its own ID in its settings, under Settings ›
AI and integrations › Apple Wallet (the apple-wallet-config group):
| Key | What it is |
|---|---|
shop-apple-wallet-pass-type-id |
The shop's own Pass Type ID, registered as above (in Badger's Apple Developer account or the shop's). Blank uses the platform's. |
shop-apple-wallet-team-id |
The team that owns it. Blank uses the platform's apple-wallet-team-id, for an ID made in Badger's account. |
shop-apple-wallet-certificate (secret) |
That ID's certificate with its private key, as a base64 .p12, made as above. |
shop-apple-wallet-certificate-password (secret) |
The .p12's password. |
shop-apple-wallet-wwdr-certificate |
Blank uses the platform's; set it only if the shop's certificate came from a different WWDR generation. |
The shop's ID is used, for both its in-store cards and its ticket passes, once the ID, the certificate
and its password are all set (WalletSettings.apple(SiteContext)). If the certificate can't be read or
has expired, a warning naming the site and the key is logged and the shop's passes are issued under the
platform's ID again, so the button never disappears because of the shop's own settings. Without
platform credentials, a shop can still offer Apple Wallet with a complete set of its own (team and WWDR
included).
Passes already in Wallet keep the ID they were issued under: our passes have no web service URL, so Wallet never fetches a new version. A customer gets the separate card by adding it again from the shop. The group is site-bound, so site transfer never copies it. Google Wallet is unchanged: one issuer for every shop.
Google Wallet:
| Key | Where it comes from |
|---|---|
google-wallet-issuer-id |
The issuer id in the Google Pay & Wallet Console › Google Wallet API. Until Google grants publishing access, only the console's test users can save passes. |
google-wallet-service-account (secret) |
In a Google Cloud project with the Google Wallet API enabled: IAM & Admin › Service accounts › create one › Keys › Add key › JSON. Paste the whole JSON file. Then add the service account's email in the Pay & Wallet Console › Users, with Developer access. |
Each event becomes one Google event class, <issuerId>.<siteId>-<eventProductId>, created the first
time one of its tickets is saved. Google doesn't change a class that already exists, so renaming or
moving an event after its first pass has been saved leaves earlier Google passes showing the old
details; the QR still works.
The buttons. The badge images are static files in
web-mvc/src/main/resources/resources/settBuilder/wallet/ (an SVG for the page, a 2x PNG for
emails, because most mail apps don't show SVG): add-to-apple-wallet.svg/.png and
add-to-google-wallet.svg/.png. Both show 48px high, Google's minimum, with 8px between them.
- Google: the official condensed "Add to Google Wallet" button, British English
(
enGB_add_to_google_wallet_add-wallet-badge.svgfrom the Google Wallet brand guidelines); the PNG is that SVG rendered at 348×96. Don't restyle or crop it. - Apple: the official UK English "Add to Apple Wallet" badge
(
US-UK_Add_to_Apple_Wallet_RGB_101421.svgfrom the Add to Apple Wallet guidelines, used under the Apple Wallet Marketing Artwork License Agreement); the PNG is that SVG rendered at 304×96 (rsvg-convert -h 96). Don't restyle or crop it.
Out of scope¶
Phase 1 doesn't do these:
- Allocated seating (seat maps, choosing a seat).
- Recurring or series events: create one product per date.
- Holding tickets in the basket: stock is taken at checkout, not when a ticket is added.
- One capacity across ticket types (e.g. 200 people whatever the mix): capacity is per type.
- Offline scanning.
- Updating wallet passes after they're issued (an Apple pass web service, push updates), PDF tickets, and names of attendees on tickets.
- Transferring or reselling tickets.