Secondary Marketplace

This guide covers peer-to-peer transfers, listing tickets for resale, and executing secondary market purchases.

Overview

TIX Protocol supports two types of secondary market operations:

  1. Direct Transfers — Send tickets directly to another wallet

  2. Resale Listings — List tickets for sale with automatic royalty distribution

Direct Transfers

Transfer a Ticket

The ticket owner (or integrator authority) can transfer directly:

import { transferPermit } from "@tixprotocol/sdk";

const tx = await transferPermit({
  connection,
  payer: currentOwner.publicKey,
  eventId: 1n,
  ticketId: 42n,
  currentOwner: currentOwner.publicKey,
  newOwner: friendWallet.publicKey,
  integratorIdentity: marketplace.publicKey,
});

tx.sign([currentOwner]);
await connection.sendTransaction(tx);

Who Can Transfer?

Actor
Can Transfer?
Notes

Current owner

Standard transfer

Integrator authority

Facilitated transfer

Anyone else

Unauthorized

Transfer Fee

Direct transfers incur the p2p_transfer_fee:

  • Deducted from integrator treasury

  • No royalties on direct transfers

  • Fee goes to protocol vault

Resale Listings

List a Ticket for Sale

Listing Options

Parameter
Type
Description

askPriceMinor

bigint

Sale price in USDC minor units

payoutAta

PublicKey

Seller's USDC ATA for payment

expiresAt

number

Unix timestamp for expiration

buyerAllow

PublicKey | null

Optional: restrict to specific buyer

Private Sales

List to a specific buyer only:

What Happens on Listing

  1. Listing account created — Stores sale details

  2. Permit lockedpadding[0] = 1 blocks direct transfers

  3. Expiry cached — Stored in permit for validation

Accepting Offers (Buying)

Purchase a Listed Ticket

Payment Flow on Purchase

What's Validated on Purchase

Check
Error if Failed

Listing is active

ListingNotActive

Listing not expired

ListingExpired

Permit version matches

ListingVersionMismatch

Buyer is allowed (if set)

Unauthorized

Buyer has sufficient USDC

Transfer fails

Permit is active

PermitNotActive

Cancelling Listings

Cancel as Seller

Who Can Cancel?

Actor
Can Cancel?

Seller (listing creator)

Integrator authority

Protocol authority

Anyone else

What Happens on Cancel

  1. Listing deactivatedlisting.active = false

  2. Permit unlockedpadding[0] = 0

  3. Ticket transferable — Can be transferred or re-listed

User Journeys

Journey: Fan Resells Ticket

Journey: Private Transfer

Listing Expiration

How Expiration Works

  • Listings have an expiresAt timestamp

  • Expired listings cannot be purchased

  • Expired listings can be cancelled to unlock the permit

  • Direct transfers are allowed if listing has expired

Handling Expired Listings

Complete Example

Full Resale Flow

Error Handling

Common secondary market errors:

Error
Cause
Solution

ListingActive

Trying to transfer listed ticket

Cancel listing first

ListingExpired

Listing past expiry

Seller re-lists, buyer finds another

ListingVersionMismatch

Ticket changed since listing

Re-fetch and retry

Unauthorized

Wrong signer or not on allowlist

Check permissions

PermitNotActive

Ticket is used/voided

Cannot sell used tickets

InsufficientFunds

Buyer lacks USDC

Fund buyer wallet

Next Steps

Last updated