When you're setting up ticket sales for a retreat, a kirtan evening, or a festival weekend, a discount code is one of the few parts of your event that travels directly into someone's hands — printed on a flyer, mentioned by a teacher, dropped into a newsletter. BrightStar's discount code engine has to decide, in the moment someone types that code in, whether it's valid, how much it's worth, and whether that person has already used up their allowance. Because checkout is the one place where a setup mistake becomes visible right away — a code that won't work at the door, or one that gives away more than intended — the engine relies on fixed, checkable rules rather than a judgment call made under pressure.
What kinds of discounts can you create?
BrightStar supports four discount types, and each one changes the price differently. A percentage discount takes a value from 1 to 100 and multiplies the ticket price by what's left over — 20 percent off a $100 ticket brings it to $80. A fixed amount discount subtracts a set number of cents from the price instead, so $10 off a $100 ticket lands at $90; this is the type to reach for when you want the saving to feel the same no matter which tier someone buys. A free ticket is technically a 100 percent discount: the ticket drops to $0 and checkout bypasses payment entirely, which matters for scholarship seats or teacher comps where you don't want a card form standing between someone and their spot. Buy X Get Y works differently again — it's configured with a buy_quantity and a free_quantity, so a "buy 2, get 1 free" code applies to how many tickets someone adds to their cart rather than to the price of any single ticket.
How BrightStar checks a code before it works
Every code passes through the same ordered checks before it's allowed onto an order: it has to exist and be active, the current time has to fall between its valid_from and valid_until dates, its total usage has to be under its usage_limit, the customer's own use of it has to be under their per_customer_limit, the order has to meet any minimum_order amount, meet any minimum_quantity of tickets, and finally the cart has to contain ticket types the code actually applies to. That order matters because it decides which error message someone sees. A misspelled code returns INVALID_CODE; one run past its date returns EXPIRED; one used up returns LIMIT_REACHED; one a customer has already redeemed returns ALREADY_USED; and one attached to too small an order returns MINIMUM_NOT_MET. Reading the specific error back tells you which setting to loosen, rather than leaving you guessing whether the code is simply broken.
Setting limits, minimums, and time windows
Beyond the discount value itself, a code carries several settings that decide who can use it and when. usage_limit caps the total number of redemptions across everyone who has the code, which protects you if a code meant for a small list ends up shared more widely than intended. per_customer_limit caps how many times one email address can redeem it, which stops a single buyer from applying an early-bird code across every order they place. valid_from and valid_until give the code a start and end date, so a code can be published ahead of time and switch on and off automatically without anyone having to remember to disable it. minimum_order and minimum_quantity set a floor on the size of the order the code can attach to, which is useful when a discount is meant to encourage a group booking or a higher-tier purchase rather than a single low-cost ticket.
Restricting a code to specific tickets
Not every discount is meant for the whole event. Setting applies_to to specific_tickets and listing the relevant ticket_ids restricts a code to only those tiers — for instance, a code meant to fill seats in a single workshop rather than discount general admission across the board. When a code like this is checked at checkout, BrightStar also confirms the cart actually contains one of the applicable ticket types before letting the code through, since a code with nothing eligible to apply to would otherwise sit on an order doing nothing.
What makes a good discount code?
A code is only as useful as it is easy to type correctly and hard to misuse. A few habits keep both true:
- 1Make the code descriptive rather than generic — YOGA25 tells someone what it's for; PROMO1 doesn't.
- 2Keep codes short, around 8 characters, since most people are typing them on a phone at a checkout screen.
- 3Set an expiration date so the code creates urgency instead of circulating indefinitely.
- 4Set a per-customer limit so one buyer can't reuse the same code across repeated orders.