This document describes the event producer registration, event listing, and ticketing system integrated with Stripe for payment processing.
The system allows avatars to register as event producers, create real-world event listings (concerts, parties, conferences, etc.), and sell tickets through a Stripe-integrated payment system. Event producers can create houses that belong to their events, and the platform collects fees from ticket sales before paying out to producers.
-
EventProducer.sol
- Manages event producer registration
- Links Stripe Connect accounts to producers
- Tracks producer statistics (events, tickets sold, revenue)
- Supports producer verification
-
EventListings.sol
- Manages real-world event listings
- Links events to producers
- Tracks event details (venue, location, time, pricing)
- Supports event categories (Concert, Party, Conference, etc.)
-
Ticketing.sol
- Manages ticket creation and validation
- Tracks ticket ownership and usage
- Integrates with Stripe payment intents
- Handles platform fee calculation
- Supports ticket tiers
-
StripeService
- Creates Stripe Connect accounts for event producers
- Handles payment intent creation with application fees
- Manages account onboarding links
- Processes transfers to connected accounts
- Handles refunds
-
BlockchainService (Extended)
- Event producer registration
- Event creation and management
- Ticket creation and validation
- Stripe account linking
-
EventProducerProvider
- State management for event producers
- Stripe account linking workflow
- Producer profile management
-
Avatar registers as event producer:
await eventProducerProvider.registerAsProducer( avatarId: avatarId, name: "Producer Name", description: "Description", email: "email@example.com", country: "US", );
-
System creates Stripe Connect account (optional):
- If email and country provided, creates Express account
- Generates account link for onboarding
- Links account ID to producer on blockchain
-
Producer completes Stripe onboarding:
- Redirects to Stripe onboarding URL
- Completes business information
- Returns to app with verified account
-
Producer creates event listing:
await blockchainService.createEvent( eventId: eventId, producerId: producerId, title: "Concert Name", description: "Event description", venue: "Venue Name", location: "123 Main St, City, State", startTime: DateTime.now().add(Duration(days: 30)), endTime: DateTime.now().add(Duration(days: 30, hours: 3)), ticketPrice: 5000, // $50.00 in cents maxTickets: 100, category: 0, // EventCategory.concert );
-
Event is stored on blockchain with all details
-
Producer can create houses linked to the event
-
Event appears in listings for ticket purchase
-
User selects event and ticket quantity
-
System creates Stripe payment intent with application fee:
final paymentIntent = await stripeService.createPaymentIntentWithFee( amount: ticketPrice * quantity, currency: 'usd', eventId: eventId, avatarId: avatarId, connectedAccountId: producerStripeAccountId, applicationFeeAmount: platformFee, );
-
User completes payment via Stripe
-
On successful payment, ticket is created on blockchain:
await blockchainService.createTicket( ticketId: ticketId, eventId: eventId, avatarId: avatarId, price: ticketPrice, stripePaymentIntentId: paymentIntent['id'], );
-
Ticket ownership recorded on blockchain
-
Event ticket count updated
-
At event entry, validator scans ticket
-
System validates ticket on blockchain:
await blockchainService.validateTicket( ticketId: ticketId, );
-
Ticket marked as used
-
Prevents duplicate entry
-
Platform collects payments via Stripe
-
Application fee deducted automatically
-
Remaining amount transferred to producer's Stripe account:
await stripeService.createTransfer( amount: netAmount, currency: 'usd', destination: producerStripeAccountId, );
-
Producer can withdraw funds from their Stripe account
- Create Stripe account for platform
- Enable Stripe Connect
- Configure application fee percentage (default: 5%)
- Set up webhook endpoints for payment events
Option 1: New Account Creation
- Producer provides email and country
- System creates Express account
- Producer completes onboarding
- Account linked to producer profile
Option 2: Existing Account
- Producer provides existing Stripe account ID
- System links account to producer
- Account must be verified and ready
- Payment Intent Creation: Creates payment intent with application fee
- Connected Account: Payment goes to producer's account
- Platform Fee: Automatically deducted via application_fee_amount
- Transfer: Remaining amount available in producer's account
- Default platform fee: 5% (configurable)
- Fee calculated on ticket price
- Deducted automatically via Stripe application fees
- Platform receives fee, producer receives net amount
Event producers can create houses that belong to their events:
-
Producer creates event
-
Producer creates house linked to event:
await blockchainService.createHouse( name: "Event House", description: "House for event attendees", eventId: eventId, eventName: eventTitle, maxMembers: 50, );
-
Event attendees can join the house
-
House activities can be created for event-related engagement
- Access Control: Only verified producers can create events
- Ticket Validation: Tickets validated on blockchain to prevent fraud
- Payment Security: All payments processed through Stripe
- Account Verification: Stripe accounts must be verified before payouts
- Event Cancellation: Producers can cancel events (tickets remain valid for refunds)
- Producer ID, Avatar ID, Name, Description
- Stripe Account ID
- Statistics (events, tickets, revenue)
- Verification status
- Event ID, Producer ID, Title, Description
- Venue, Location, Start/End Time
- Ticket Price, Max Tickets, Tickets Sold
- Category, Status
- Ticket ID, Event ID, Avatar ID
- Buyer Address, Purchase Time
- Price, Validation Status
- Stripe Payment Intent ID
- Account creation and management
- Payment intent creation
- Transfer creation
- Refund processing
- Producer registration
- Event creation
- Ticket minting
- Ticket validation
- Ticket Tiers: Support for VIP, General Admission, etc.
- Early Bird Pricing: Time-based pricing
- Group Discounts: Bulk ticket pricing
- Refund System: Automated refund processing
- Analytics Dashboard: Producer analytics
- Mobile Check-in: QR code scanning for validation
- Waitlist: Waitlist for sold-out events
- Producer registration with Stripe account
- Event creation and listing
- Ticket purchase flow
- Payment processing with fees
- Ticket validation
- Payout to producer
- Event cancellation and refunds
- Use Stripe test mode for development
- Test payment methods:
4242 4242 4242 4242 - Test connected accounts in test mode
- Deploy EventProducer contract
- Deploy EventListings contract
- Deploy Ticketing contract
- Configure Stripe Connect
- Set up webhook endpoints
- Configure platform fee
- Test payment flow
- Test payout flow
- Set up monitoring
- Document API endpoints
For issues related to:
- Stripe: Check Stripe Dashboard and logs
- Blockchain: Check contract events and transactions
- Integration: Review service logs and error messages