Tickets
Vendors can sell event tickets and scan tickets at venue entry points using the Vendor App.
Overview
Ticket operations for vendors:
- Sell tickets to customers
- Scan tickets at entry gates
- View ticket sales history
- Manage event check-ins
Sell Tickets
Sales Flow
┌─────────────────────────────────────────────────────────┐
│ Ticket Sales Flow │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐│
│ │ Select │────▶│ Enter │────▶│ Collect ││
│ │ Event │ │ Quantity │ │ Payment ││
│ └─────────────┘ └─────────────┘ └──────┬──────┘│
│ │ │
│ ▼ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐│
│ │ Receipt │◀────│ Confirm │◀────│ Customer ││
│ │ & Ticket │ │ Sale │ │ Phone ││
│ └─────────────┘ └─────────────┘ └─────────────┘│
│ │
└─────────────────────────────────────────────────────────┘Sales Steps
- Select event from active events list
- Choose ticket type and quantity
- Customer pays (cash or digital)
- Enter customer phone number
- Confirm and process sale
- Tickets sent to customer's app
Event Display
| Field | Description |
|---|---|
| Name | Event name |
| Date | Event date |
| Image | Event banner |
| Available | Remaining tickets |
Scan Tickets
Scan Flow
┌─────────────────────────────────────────────────────────┐
│ Ticket Scan Flow │
├─────────────────────────────────────────────────────────┤
│ │
│ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐│
│ │ Select │────▶│ Scan QR │────▶│ Validate ││
│ │ Event │ │ Code │ │ Ticket ││
│ └─────────────┘ └─────────────┘ └──────┬──────┘│
│ │ │
│ ┌─────────────────────┤ │
│ │ │ │
│ ▼ ▼ │
│ ┌──────────┐ ┌──────────┐ │
│ │ Valid │ │ Invalid │ │
│ │ Entry │ │ Rejected │ │
│ └──────────┘ └──────────┘ │
│ │
└─────────────────────────────────────────────────────────┘Validation Results
| Result | Meaning | Display |
|---|---|---|
valid | Ticket is valid, first scan | Green checkmark |
already_used | Ticket already scanned | Red X, "Already used" |
wrong_event | Ticket for different event | Red X, "Wrong event" |
expired | Event has passed | Red X, "Expired" |
invalid | Ticket not found | Red X, "Invalid ticket" |
Scan Feedback
- Valid: Green success with sound
- Invalid: Red error with different sound
Scan History
View all scans for current event:
| Field | Description |
|---|---|
| Attendee | Person name |
| Ticket Type | VIP, General, etc. |
| Time | Scan timestamp |
| Status | Valid/Rejected |
| Reason | If rejected, why |
Statistics
| Metric | Description |
|---|---|
| Total Tickets | Tickets sold for event |
| Scanned | Number checked in |
| Scan Rate | Percentage checked in |
| Rejected | Invalid scan attempts |
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/vendor/tickets/events | GET | Active events |
/vendor/tickets/sell | POST | Sell tickets |
/vendor/tickets/validate | POST | Validate ticket |
/vendor/tickets/history/:eventId | GET | Scan history |
/vendor/tickets/stats/:eventId | GET | Event statistics |
Error Handling
| Error | Cause | Action |
|---|---|---|
TKT_V01 | Event not found | Select valid event |
TKT_V02 | Sold out | No tickets available |
TKT_V03 | Invalid QR | Ask for valid ticket |
TKT_V04 | Already scanned | Inform customer |
TKT_V05 | Wrong event | Direct to correct gate |
Related Files
| File | Purpose |
|---|---|
lib/screens/tickets/sell_ticket_screen.dart | Sell tickets |
lib/screens/tickets/scan_ticket_screen.dart | Scan tickets |
lib/screens/tickets/scan_history_screen.dart | Scan history |
lib/controllers/ticket_controller.dart | Ticket controller |
lib/services/ticket_service.dart | Ticket service |