Wakao’s ticketing engine turns any activity into a professionally managed, revenue-generating event.
Why Ticketing Matters in a Social App
Most social apps stop at RSVPs. Wakao goes further. Inside the same app where you discover activities and chat with people, you can also create ticketed events, sell multiple ticket types, accept payments, scan tickets at the door, transfer ownership, and generate PDF tickets.
Under the hood, Wakao’s ticketing system is not an afterthought – it’s a full-stack, enterprise-grade flow powered by Firebase, Cloud Functions, Stripe, NOWPayments (crypto), and highly optimized Flutter screens.
This article breaks down how ticket selling works in Wakao, based directly on the production code that powers:
- Ticket creation in the activity editor
- Checkout flows with Stripe and crypto
- Your Tickets wallet with QR codes and PDFs
- Ticket scanning at the door
- Ticket transfers between users
TL;DR: One Activity, Full Ticketing Stack
Create an activity → define ticket types → connect a payment provider → users buy tickets → see them in “Your Tickets” with QR & PDF → host scans at the door → tickets can be transferred safely. All inside Wakao.
1. Creating Ticketed Activities: Multi-Tier Tickets by Design
Ticketing starts in the Create Activity screen. Instead of a single “price” field, Wakao lets you define multiple ticket types with different names, prices, and quantities. In the code, this is handled via a _ticketTypes list that stores entries like:
{ name, price, quantity }for each ticket tier- Dedicated controllers for price, name, and quantity per ticket type
Wakao also ties your activity capacity directly to your ticket configuration. For paid group activities, the maxPeople value is automatically calculated from ticket quantities, so:
- No more guessing capacity – it follows your ticket stock
- Overbooking is prevented at the data level
The system checks your chosen payment category and ticket configuration to make sure that when you say “Paid with tickets,” the underlying data actually supports it.
2. Secure Payments: Stripe & Crypto in One Flow
The checkout experience lives in ActivityTicketCheckoutScreen. This screen pulls ticket types from the activity document and lets users choose quantities per tier. Under the hood, Wakao calculates the total and then delegates to a dedicated service:
ActivityTicketService.processTicketPaymenthandles validation and calls Cloud Functions- Stripe PaymentSheet is used on mobile (via
flutter_stripe) - NOWPayments powers crypto flows, including available currencies and payment URLs
Before any payment is made, the service validates:
- That the activity exists and has a configured
paymentProvider - That ticket types actually exist for the activity
- That the selected ticket indices are valid
- That requested quantities don’t exceed remaining stock
Only after those checks does the checkout screen call the Cloud Function processActivityTicketPayment, which returns:
transactionIdandorderIdfor trackingclientSecretfor Stripe PaymentSheet (card payments)paymentUrl,payAmount, andpayCurrencyfor crypto payments- A flag indicating whether payment is synchronous or async
The result is a checkout flow that feels simple to the user but is robust enough for real-world ticket sales.
3. Ticket Creation & Storage: Every Ticket Is a Real Asset
Once payment succeeds, tickets are created inside Firestore under each activity:
- Tickets live in
activities/{activityId}/ticketscollections - Each ticket document stores the
userId,ticketTypeName,price,quantity, status fields, and more - Services like
getUserTicketsanduserHasTicketsprovide fast lookups for both UX and access control
The status field (active, used, cancelled) is what the scanner and transfer flows rely on later. This ensures end-to-end consistency between sale, entry validation, and ownership history.
4. Your Tickets Screen: A Wallet for All Your Events
On the attendee side, the YourTicketsScreen acts as a ticket wallet. Instead of manually hunting through activities, users see all their active tickets in one place.
Technically, this screen:
- Uses a Firestore
collectionGroup('tickets')query filtered byuserIdandstatus == 'active' - Limits results to the latest 50 tickets for cost and performance optimization
- Fetches all related activity documents in parallel for richer context (name, location, time, images)
Each ticket card can show:
- Activity name, date, time, and location
- Ticket type and quantity
- QR code used by the scanner
- Actions like transfer ticket or download/share PDF
The screen is heavily optimized for memory (clearing image caches, limiting cache sizes, lazy-building lists), which is crucial for users with many tickets on mid-range devices.
5. PDF Tickets with QR Codes: Professional-Grade Output
For attendees who want something they can print, archive, or share, Wakao offers PDF ticket generation. The TicketPdfService turns each ticket into a beautifully formatted PDF document that includes:
- Wakao branding and logo (with multiple asset fallbacks)
- Event name, host or company name, date & time, and location
- Ticket type, quantity, and price
- A QR code generated from the ticket ID using
qr_flutter - Design elements like gradients, headers, and clear sections
The service renders a high-resolution QR image server-side, embeds it into a PDF via the pdf package, saves it to a temporary directory, and then uses share_plus so users can email or message their ticket PDFs.
Result: even if your attendees prefer paper at the door, you’re covered.
6. Ticket Scanner: Fast, Cross-Platform Entry Validation
On the organizer side, Wakao provides a TicketScannerScreen that turns a phone or tablet into a QR scanner.
Key behaviors from the code:
- Uses a cross-platform TicketScannerService with separate mobile/web implementations
- Prevents duplicate scans of the same code within 2 seconds (debounce)
- Looks up the ticket by document ID in
activities/{activityId}/tickets - Verifies the ticket belongs to the correct activity
- Checks that status is
active(not already used or cancelled) - On success, updates status to
usedand logsvalidatedAtandvalidatedBy
Hosts see instant feedback dialogs like “Ticket Validated” or “Ticket Already Used,” which keeps the line moving and prevents fraud.
7. Ticket Transfers: Send Your Spot to a Friend
Plans change. Instead of asking hosts to manually edit lists, Wakao gives users a secure TicketTransferService and UI dialog to send tickets to friends.
The transfer flow enforces several safety rules:
- Only the current ticket owner (
userId) can initiate a transfer - Ticket must be
active(not used or cancelled) - No existing pending transfer for the same ticket
- Sender and recipient must be different users
When a transfer is initiated:
- A
ticketTransfersdocument is created withfromUserId,toUserId, and an expiration date - The ticket is marked with
transferStatus: 'pending'and linked to the transfer ID - A notification is sent to the recipient using Wakao’s notification service
Accepting a transfer uses a Firestore batch to atomically:
- Update ticket ownership (
userId→ new owner) - Record
transferredAtandtransferredFrom - Set
transferStatus: 'completed' - Mark the transfer record as
accepted
This means ticket history is preserved, fraud is minimized, and users can safely pass tickets to friends without leaving the app.
8. Designed for Scale, Performance, and Safety
Because Wakao is built for real communities, not just one-off events, the ticketing codebase includes a long list of enterprise best practices:
- Cost-aware queries: Limiting ticket loads and using
collectionGroupwisely - Memory optimizations: Clearing image caches, using lazy builders, and wrapping UI elements in
RepaintBoundary - Strict validation: Server-side verification of ticket quantities, indices, and activity/payment configuration
- Robust error handling: Clear user-facing messages and detailed debug logs (under
kDebugMode) - Atomic updates: Firestore batch operations for sensitive flows like transfers and validation
The end result: a ticketing experience that feels simple and friendly on the surface but is engineered to handle real money, real people, and real-world edge cases.
Ready to Sell Tickets for Your Next Activity?
Whether you’re hosting a small workshop, a recurring fitness class, or a full-scale concert, Wakao’s ticketing engine gives you everything you need – no extra tools required.
Create a Ticketed Activity on WakaoConclusion: Social + Ticketing in One Place
Traditional event tools force you to juggle multiple apps: one for discovery, another for tickets, a third for communication, and maybe a spreadsheet for tracking who actually showed up.
Wakao closes the loop. The same place where people discover your activity, chat with you, and share photos after the event is also where they:
- Buy tickets with card or crypto
- Store them in a unified ticket wallet
- Scan them at the door
- Transfer them to friends
- Download professional PDFs with QR codes
If you’re serious about hosting experiences – not just posts – Wakao’s ticketing system is built for you.
Start with your next activity, add tickets, and let the platform handle the heavy lifting: payments, validation, and logistics. You focus on what you do best: creating unforgettable experiences.