Ticket-type fields reference
A ticket type is a package you sell on an event — for example "General Admission", "Early Bird" or "VIP". Each ticket type has a name, optional fields and up to two pricing tiers.
Ticket type fields
These fields live on the ticket_type table and describe the package itself.
| Field | Type | Required | What it does |
|---|---|---|---|
| name | text | yes | The public name shown to buyers (e.g. "General Admission") |
| classes_included | integer | yes | Number of classes/sessions included (default 0 — set to 1+ for multi-session events) |
| display_order | integer | no | Controls the order ticket types appear on the public page (lower = first) |
Pricing tiers (ticket_price)
Each ticket type can have up to two pricing tiers: advance (sold online before the event) and door (sold at the door on the day). Both are optional — a ticket type can have zero, one or two tiers.
| Field | Type | Required | What it does |
|---|---|---|---|
| timing | text | yes | 'advance' or 'door' |
| price | numeric | yes | The price in your currency (e.g. 15.00) |
| sales_channel | text | yes | 'online', 'door' or 'both' — where this tier can be purchased |
| available_from | timestamptz | no | When this tier becomes available (for advance: e.g. "early bird ends Friday") |
| available_until | timestamptz | no | When this tier stops being available |
How the pricing tiers work in practice
- One advance tier: the simplest setup. Everyone pays the same price online.
- Advance + door: the online price can be lower than the door price (incentivising advance purchase).
- Time-limited advance: set
available_from/available_untilon the advance tier to create early-bird windows. When the window closes, the tier is no longer available online. - Door only: set timing to
'door'and sales_channel to'door'— tickets are only sold at the venue.
Available capacity
Available capacity is not a column on ticket types or events. It is computed at query time as:
event.capacity − count(tickets where status is 'valid' or 'used')
This means capacity is shared across all ticket types for the event — there is no per-type capacity limit.
How ticket types relate to orders
When someone buys a ticket, the order records both the ticket type (which package) and the specific pricing tier that was resolved and charged. This lets you see exactly which tier each order used.