Enable bet sharing on top of the hosted adapter, allowing users to share their bets with other Virtual Stadium users.
Because the hosted adapter has no knowledge of the bets placed on your platform, Bet Share is implemented as an adapter extension: you provide the tickets endpoint that retrieves the user's bets from your system.
To integrate bet sharing with Virtual Stadium:
Register your adapter with the global SIR function, ensuring only one adapter is registered per page load.
Implement the tickets endpoint to fetch and return TicketResponseV2 via callback.
Choose a delivery method — non-paginated (full list) or paginated (ticketsFetchMore). See Implementation options below.
Return tickets by calling callback(undefined, data) from your adapter. For paginated integrations, also handle onAction ticketsFetchMore on the embed page.
The widget stack calls your tickets endpoint when users open the bet-share picker. The same adapter contract also powers Central Hub share-betslip screens.
New integrations must return TicketResponseV2 — not the deprecated BetShareResponse format.
Flow diagrams, field tables, and code examples: Tickets Function reference.
Step-by-step tutorials:
Paginated integrations require an onAction handler on the embed page. Page 2+ is not fetched by calling tickets() again — store the callback from the initial tickets() call and invoke it with { newTickets, ... }.
Backend: Implement the tickets endpoint handler as an extension of the hosted adapter.
For a full walkthrough with copy-pasteable examples, see the Adapter Tickets Endpoint Example.
Frontend: Enable the Copy Bet Button widget
To allow users to interact with and copy bets in the UI, see the Copy Bet Button documentation.
For paginated ticket loading, see the Bet Share widget documentation (ticketsFetchMore onAction).
The widget invokes tickets(args, callback) once. You call callback to deliver data — including subsequent pagination pages via the stored callback reference. The widget never calls callback.
| Option A — Non-paginated | Option B — Paginated | |
|---|---|---|
| When to use | Small ticket lists | Large ticket histories |
| First callback | { tickets: Ticket[] } — complete list | { tickets, pageSize, hasMore, nextCursor } — first batch |
| Further callbacks | Usually none — single { tickets } emission is tested | You call the stored callback with { newTickets, hasMore?, nextCursor? } after onAction ticketsFetchMore |
| Pagination | N/A | Widget fires onAction ticketsFetchMore when the next page is needed |