The discount engine supports percentage discounts, flat amounts, and free tickets with configurable usage limits and expiration rules.
Discount Types
Percentage Off
Fixed Amount Off
Free Ticket
Buy X Get Y
Discount Code Schema
{
"code": "EARLYBIRD20",
"type": "percent",
"value": 20,
"currency": "usd", // For fixed discounts
"applies_to": "all", // all | specific_tickets
"ticket_ids": [], // If specific_tickets
"usage_limit": 100, // Total uses allowed
"usage_count": 45, // Current uses
"per_customer_limit": 1, // Uses per email
"valid_from": "2025-01-01T00:00:00Z",
"valid_until": "2025-02-01T00:00:00Z",
"minimum_order": 5000, // $50 minimum (cents)
"minimum_quantity": 2, // Min tickets to apply
"active": true
}Discount code generator and tester
Interactive component coming soon
Validation Rules
Validation Order 1. Code exists and is active 2. Current time within valid_from/valid_until 3. Usage count < usage_limit 4. Customer hasn't exceeded per_customer_limit 5. Order meets minimum_order amount 6. Order meets minimum_quantity 7. Applicable ticket types in cart
Error Responses • INVALID_CODE: Code doesn't exist • EXPIRED: Past valid_until date • LIMIT_REACHED: Usage limit hit • ALREADY_USED: Customer limit hit • MINIMUM_NOT_MET: Order too small
Code Generation Strategies
Best practices for discount codes:
- Use descriptive codes: YOGA25 not PROMO1
- Keep codes short (8 chars max for mobile typing)
- Set expiration dates to create urgency
- Limit per-customer usage to prevent abuse
- Track performance via Analytics → Discount Report
- Use unique codes for influencer tracking