Primary Ticket Sales
This guide covers the complete workflow for creating events and issuing tickets through TIX Protocol.
Overview
Primary sales involve two main steps:
Event Registration — Create an event with supply and royalty settings
Permit Issuance — Issue tickets to buyers
Prerequisites
Before creating events, ensure you have:
Been registered as an integrator with TIX Protocol
Funded your integrator treasury with USDC
Your integrator authority keypair
Event Registration
Create an Event
import { registerEvent } from "@tixprotocol/sdk";
const { tx, event } = await registerEvent({
connection,
payer: integratorAuthority.publicKey,
integratorIdentity: integratorKeypair.publicKey,
integratorAuthority: integratorAuthority.publicKey,
eventId: 1n, // Unique event identifier
totalSupply: 5000n, // Maximum tickets
royaltyBps: 500, // 5% royalty on resales
minRoyaltyFloor: 100_000n, // Minimum $1.00 royalty
royaltyRecipients: [
{ destination: artistRoyaltyAta, bps: 300 }, // 3% to artist
{ destination: venueRoyaltyAta, bps: 200 }, // 2% to venue
],
});
tx.sign([integratorAuthority]);
await connection.sendTransaction(tx);Event Configuration Options
eventId
bigint
Unique identifier for the event
totalSupply
bigint
Maximum number of tickets
royaltyBps
number
Royalty percentage (basis points, 0-10000)
minRoyaltyFloor
bigint
Minimum royalty per sale (USDC minor units)
royaltyRecipients
Array
Up to 3 recipients with BPS splits
Royalty Recipient Setup
Recipients must have USDC ATAs to receive royalties:
Important: The sum of recipient BPS must equal royaltyBps:
Permit Issuance
Issue Multiple Tickets
Ticket ID Assignment
Ticket IDs are sequential and must be within total supply:
Complete Example
End-to-End Primary Sale
User Journey: Fan Buys Ticket
Error Handling
Common errors during primary sales:
SupplyExceeded
Ticket ID >= total supply
Use valid ticket ID
TicketAlreadyMinted
Ticket ID already issued
Use different ticket ID
IntegratorSuspended
Integrator not active
Contact TIX Protocol support
InsufficientFunds
Treasury lacks USDC
Fund integrator treasury
TooManyRoyaltyRecipients
More than 3 recipients
Reduce to max 3
RoyaltyBpsMismatch
Recipient BPS don't sum to royaltyBps
Fix BPS allocation
Next Steps
Secondary Marketplace — Enable ticket resales
Integrator Guide — Complete integrator operations
SDK Reference — Detailed SDK documentation
Last updated