Skip to main content

LiveClient

@ticketlayer/live


@ticketlayer/live / index / LiveClient

Class: LiveClient

Defined in: client.ts:90

Generated Live client. Mirrors the sales surface (byte-for-byte views) plus the Live-only /session and /queue operations. Auth is the Live session (cookie on hosted web; X-Live-Session header elsewhere) + the channel publishable key for embeds. Browser ergonomics live in createLiveClient.

Constructors

Constructor

new LiveClient(config: LiveClientConfig): LiveClient;

Defined in: client.ts:97

Parameters

ParameterType
configLiveClientConfig

Returns

LiveClient

Methods

clearSession()

clearSession(): Promise<void>;

Defined in: client.ts:115

Returns

Promise<void>


getSessionToken()

getSessionToken(): Promise<string | null>;

Defined in: client.ts:111

The current session token (token mode), if any - used for embed handoff.

Returns

Promise<string | null>


setSessionToken()

setSessionToken(token: string): Promise<void>;

Defined in: client.ts:106

Store the Live session id (token mode). Called after POST /session.

Parameters

ParameterType
tokenstring

Returns

Promise<void>

Properties

queue

queue: {
join: () => Promise<any>;
status: () => Promise<any>;
};

Defined in: client.ts:559

Queue methods

join

join: () => Promise<any>;

Join the waiting room Joins the current session to the waiting room. While the queue is disabled this is a no-op that reports immediate admission.

Returns

Promise<any>

Operation Id

joinLiveQueue

status

status: () => Promise<any>;

Get waiting-room status Returns the waiting-room status for the current session. The waiting room lives only in Live; when disabled the queue is transparent and every session is admitted.

Returns

Promise<any>

Operation Id

getLiveQueueStatus


sales

sales: {
get: (eventId: string) => Promise<{
currency: string | null;
description: string | null;
heroImageUrl: string | null;
id: string;
imageUrl: string | null;
name: string;
occurrences: {
endDate: string;
endsAt: string | null;
endTime: string;
id: string;
startDate: string;
startsAt: string | null;
startTime: string;
status: string;
ticketTypes: {
categoryId: string;
categoryName: string;
currency: string;
description: string | null;
ticketTypeId: string;
ticketTypeName: string;
unitPrice: number;
}[];
timezone: string;
}[];
presentation: | {
buttonSize?: "small" | "medium" | "large";
cinemaGradient?: {
position: "bottom" | "center";
strength: 20 | 50 | 70;
};
heroLayout?: {
size: "small" | "medium" | "large";
type: "hero" | "cinema";
};
navbar?: {
transparent?: boolean;
};
twoColumnSplit?: [number, number];
}
| null;
priceFrom: number | null;
shortDescription: string | null;
status: string;
subtitle: string | null;
timezone: string;
venueCity: string | null;
venueId: string | null;
venueName: string | null;
}>;
getTheme: () => Promise<{
brand: {
[key: string]: unknown;
};
colors: {
[key: string]: unknown;
};
design?: | {
[key: string]: unknown;
}
| null;
id: string;
name: string;
shape: {
[key: string]: unknown;
};
typography: {
[key: string]: unknown;
};
}>;
resolveChannel: (options?: {
domain: string;
}) => Promise<{
channel: {
id: string;
name: string;
slug: string;
};
publishableKey: string | null;
}>;
};

Defined in: client.ts:465

Sales methods

get

get: (eventId: string) => Promise<{
currency: string | null;
description: string | null;
heroImageUrl: string | null;
id: string;
imageUrl: string | null;
name: string;
occurrences: {
endDate: string;
endsAt: string | null;
endTime: string;
id: string;
startDate: string;
startsAt: string | null;
startTime: string;
status: string;
ticketTypes: {
categoryId: string;
categoryName: string;
currency: string;
description: string | null;
ticketTypeId: string;
ticketTypeName: string;
unitPrice: number;
}[];
timezone: string;
}[];
presentation: | {
buttonSize?: "small" | "medium" | "large";
cinemaGradient?: {
position: "bottom" | "center";
strength: 20 | 50 | 70;
};
heroLayout?: {
size: "small" | "medium" | "large";
type: "hero" | "cinema";
};
navbar?: {
transparent?: boolean;
};
twoColumnSplit?: [number, number];
}
| null;
priceFrom: number | null;
shortDescription: string | null;
status: string;
subtitle: string | null;
timezone: string;
venueCity: string | null;
venueId: string | null;
venueName: string | null;
}>;

Get event catalogue detail Catalogue detail for an event listed on this channel: occurrences with their priced ticket-type offers. Benefit-gated types are included only when the request carries a customer token holding the benefit. Returns 404 if the event is not listed on this channel.

Parameters
ParameterType
eventIdstring
Returns

Promise<{ currency: string | null; description: string | null; heroImageUrl: string | null; id: string; imageUrl: string | null; name: string; occurrences: { endDate: string; endsAt: string | null; endTime: string; id: string; startDate: string; startsAt: string | null; startTime: string; status: string; ticketTypes: { categoryId: string; categoryName: string; currency: string; description: string | null; ticketTypeId: string; ticketTypeName: string; unitPrice: number; }[]; timezone: string; }[]; presentation: | { buttonSize?: "small" | "medium" | "large"; cinemaGradient?: { position: "bottom" | "center"; strength: 20 | 50 | 70; }; heroLayout?: { size: "small" | "medium" | "large"; type: "hero" | "cinema"; }; navbar?: { transparent?: boolean; }; twoColumnSplit?: [number, number]; } | null; priceFrom: number | null; shortDescription: string | null; status: string; subtitle: string | null; timezone: string; venueCity: string | null; venueId: string | null; venueName: string | null; }>

Operation Id

getSalesEvent

getTheme

getTheme: () => Promise<{
brand: {
[key: string]: unknown;
};
colors: {
[key: string]: unknown;
};
design?: | {
[key: string]: unknown;
}
| null;
id: string;
name: string;
shape: {
[key: string]: unknown;
};
typography: {
[key: string]: unknown;
};
}>;

Get channel theme The channel's resolved (inheritance-merged) theme for SSR injection. Returns 404 if the channel has neither its own theme nor an organisation base theme.

Returns

Promise<{ brand: { [key: string]: unknown; }; colors: { [key: string]: unknown; }; design?: | { [key: string]: unknown; } | null; id: string; name: string; shape: { [key: string]: unknown; }; typography: { [key: string]: unknown; }; }>

Operation Id

getSalesTheme

resolveChannel

resolveChannel: (options?: {
domain: string;
}) => Promise<{
channel: {
id: string;
name: string;
slug: string;
};
publishableKey: string | null;
}>;

Resolve a channel by domain Public tenant resolution for hosted surfaces: maps a hostname (the channel's configured subdomain or custom domain) to its channel summary and publishable key. No authentication; rate-limited.

Parameters
ParameterType
options?{ domain: string; }
options.domain?string
Returns

Promise<{ channel: { id: string; name: string; slug: string; }; publishableKey: string | null; }>

Operation Id

resolveSalesChannel


salesCarts

salesCarts: {
addItem: (cartId: string, request: {
categoryId: string;
eventLayoutAreaId?: string;
eventLayoutSeatIds?: string[];
eventOccurrenceId: string;
quantity?: number;
ticketTypeId: string;
}) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;
checkout: (cartId: string, request: {
customer?: {
email: string;
firstName?: string;
lastName?: string;
marketingConsent?: boolean;
phone?: string;
};
customerNotes?: string;
metadata?: Record<string, any>;
}) => Promise<{
cart: {
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
};
order: {
createdAt: string;
currency: string;
expiresAt: string | null;
id: string;
items: {
description: string | null;
name: string;
quantity: number;
subtotal: number;
type: string;
unitPrice: number;
}[];
orderNumber: string;
paymentStatus: string;
status: string;
subtotal: number;
tickets: {
admissionStatus: string;
barcode: string;
eventOccurrenceId: string | null;
holderName: string | null;
id: string;
name: string;
seatLabel: string | null;
status: string;
type: string;
}[];
total: number;
totalFees: number;
totalTax: number;
};
orderAccessToken: string;
}>;
create: (request: {
metadata?: Record<string, any>;
}) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;
get: (cartId: string) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;
removeItem: (cartId: string, itemId: string) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;
};

Defined in: client.ts:240

Sales Carts methods

addItem

addItem: (cartId: string, request: {
categoryId: string;
eventLayoutAreaId?: string;
eventLayoutSeatIds?: string[];
eventOccurrenceId: string;
quantity?: number;
ticketTypeId: string;
}) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;

Add cart item Add an item to the cart, taking a real inventory reservation with the channel's TTL

Parameters
ParameterType
cartIdstring
request{ categoryId: string; eventLayoutAreaId?: string; eventLayoutSeatIds?: string[]; eventOccurrenceId: string; quantity?: number; ticketTypeId: string; }
request.categoryIdstring
request.eventLayoutAreaId?string
request.eventLayoutSeatIds?string[]
request.eventOccurrenceIdstring
request.quantity?number
request.ticketTypeIdstring
Returns

Promise<{ currency: string | null; expiresAt: string; id: string; items: { categoryName: string; currency: string; eventName: string; eventOccurrenceId: string; id: string; quantity: number; subtotal: number; ticketTypeName: string; unitPrice: number; }[]; itemsSubtotal: number; orderId: string | null; status: string; }>

Operation Id

addSalesCartItem

checkout

checkout: (cartId: string, request: {
customer?: {
email: string;
firstName?: string;
lastName?: string;
marketingConsent?: boolean;
phone?: string;
};
customerNotes?: string;
metadata?: Record<string, any>;
}) => Promise<{
cart: {
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
};
order: {
createdAt: string;
currency: string;
expiresAt: string | null;
id: string;
items: {
description: string | null;
name: string;
quantity: number;
subtotal: number;
type: string;
unitPrice: number;
}[];
orderNumber: string;
paymentStatus: string;
status: string;
subtotal: number;
tickets: {
admissionStatus: string;
barcode: string;
eventOccurrenceId: string | null;
holderName: string | null;
id: string;
name: string;
seatLabel: string | null;
status: string;
type: string;
}[];
total: number;
totalFees: number;
totalTax: number;
};
orderAccessToken: string;
}>;

Checkout cart Convert the cart into an order. Returns an order access token for possession-based guest access (confirmation page, payment status polling).

Parameters
ParameterType
cartIdstring
request{ customer?: { email: string; firstName?: string; lastName?: string; marketingConsent?: boolean; phone?: string; }; customerNotes?: string; metadata?: Record<string, any>; }
request.customer?{ email: string; firstName?: string; lastName?: string; marketingConsent?: boolean; phone?: string; }
request.customer.emailstring
request.customer.firstName?string
request.customer.lastName?string
request.customer.marketingConsent?boolean
request.customer.phone?string
request.customerNotes?string
request.metadata?Record<string, any>
Returns

Promise<{ cart: { currency: string | null; expiresAt: string; id: string; items: { categoryName: string; currency: string; eventName: string; eventOccurrenceId: string; id: string; quantity: number; subtotal: number; ticketTypeName: string; unitPrice: number; }[]; itemsSubtotal: number; orderId: string | null; status: string; }; order: { createdAt: string; currency: string; expiresAt: string | null; id: string; items: { description: string | null; name: string; quantity: number; subtotal: number; type: string; unitPrice: number; }[]; orderNumber: string; paymentStatus: string; status: string; subtotal: number; tickets: { admissionStatus: string; barcode: string; eventOccurrenceId: string | null; holderName: string | null; id: string; name: string; seatLabel: string | null; status: string; type: string; }[]; total: number; totalFees: number; totalTax: number; }; orderAccessToken: string; }>

Operation Id

checkoutSalesCart

create

create: (request: {
metadata?: Record<string, any>;
}) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;

Create cart Create a cart on this channel. Customer identity comes only from a verified customer token, never from the body.

Parameters
ParameterType
request{ metadata?: Record<string, any>; }
request.metadata?Record<string, any>
Returns

Promise<{ currency: string | null; expiresAt: string; id: string; items: { categoryName: string; currency: string; eventName: string; eventOccurrenceId: string; id: string; quantity: number; subtotal: number; ticketTypeName: string; unitPrice: number; }[]; itemsSubtotal: number; orderId: string | null; status: string; }>

Operation Id

createSalesCart

get

get: (cartId: string) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;

Get cart Get a cart with its items

Parameters
ParameterType
cartIdstring
Returns

Promise<{ currency: string | null; expiresAt: string; id: string; items: { categoryName: string; currency: string; eventName: string; eventOccurrenceId: string; id: string; quantity: number; subtotal: number; ticketTypeName: string; unitPrice: number; }[]; itemsSubtotal: number; orderId: string | null; status: string; }>

Operation Id

getSalesCart

removeItem

removeItem: (cartId: string, itemId: string) => Promise<{
currency: string | null;
expiresAt: string;
id: string;
items: {
categoryName: string;
currency: string;
eventName: string;
eventOccurrenceId: string;
id: string;
quantity: number;
subtotal: number;
ticketTypeName: string;
unitPrice: number;
}[];
itemsSubtotal: number;
orderId: string | null;
status: string;
}>;

Remove cart item Remove an item from the cart, releasing its reservation

Parameters
ParameterType
cartIdstring
itemIdstring
Returns

Promise<{ currency: string | null; expiresAt: string; id: string; items: { categoryName: string; currency: string; eventName: string; eventOccurrenceId: string; id: string; quantity: number; subtotal: number; ticketTypeName: string; unitPrice: number; }[]; itemsSubtotal: number; orderId: string | null; status: string; }>

Operation Id

removeSalesCartItem


salesCustomerAuth

salesCustomerAuth: {
magicLink: (request: {
email?: string;
phone?: string;
}) => Promise<boolean>;
};

Defined in: client.ts:189

Sales Customer Auth methods

magicLink: (request: {
email?: string;
phone?: string;
}) => Promise<boolean>;

Request magic link Start a magic-link sign-in for a customer. Always reports success - account existence is never revealed.

Parameters
ParameterType
request{ email?: string; phone?: string; }
request.email?string
request.phone?string
Returns

Promise<boolean>

Operation Id

requestSalesMagicLink


salesCustomers

salesCustomers: {
create: (request: {
email: string;
firstName?: string;
lastName?: string;
marketingConsent?: boolean;
phone?: string;
}) => Promise<{
email: string;
firstName: string | null;
id: string;
lastName: string | null;
}>;
get: (customerId: string) => Promise<{
email: string;
firstName: string | null;
id: string;
lastName: string | null;
}>;
update: (customerId: string, request: {
firstName?: string;
lastName?: string;
phone?: string;
}) => Promise<{
email: string;
firstName: string | null;
id: string;
lastName: string | null;
}>;
};

Defined in: client.ts:400

Sales Customers methods

create

create: (request: {
email: string;
firstName?: string;
lastName?: string;
marketingConsent?: boolean;
phone?: string;
}) => Promise<{
email: string;
firstName: string | null;
id: string;
lastName: string | null;
}>;

Create customer Provenance-scoped channel CRM (secret keys only). Reuses the org's existing record for the email and grants the channel access; there is no list or search.

Parameters
ParameterType
request{ email: string; firstName?: string; lastName?: string; marketingConsent?: boolean; phone?: string; }
request.emailstring
request.firstName?string
request.lastName?string
request.marketingConsent?boolean
request.phone?string
Returns

Promise<{ email: string; firstName: string | null; id: string; lastName: string | null; }>

Operation Id

createSalesCustomer

get

get: (customerId: string) => Promise<{
email: string;
firstName: string | null;
id: string;
lastName: string | null;
}>;

Get customer Get a customer the channel holds an access grant for (created through it, or who bought through it)

Parameters
ParameterType
customerIdstring
Returns

Promise<{ email: string; firstName: string | null; id: string; lastName: string | null; }>

Operation Id

getSalesCustomer

update

update: (customerId: string, request: {
firstName?: string;
lastName?: string;
phone?: string;
}) => Promise<{
email: string;
firstName: string | null;
id: string;
lastName: string | null;
}>;

Update customer Update a customer the channel holds an access grant for. The update surface is deliberately small - email changes go through the org's staff.

Parameters
ParameterType
customerIdstring
request{ firstName?: string; lastName?: string; phone?: string; }
request.firstName?string
request.lastName?string
request.phone?string
Returns

Promise<{ email: string; firstName: string | null; id: string; lastName: string | null; }>

Operation Id

updateSalesCustomer


salesCustomerTokens

salesCustomerTokens: {
create: (request: {
proof: any;
}) => Promise<{
customer: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
customerToken: string;
expiresIn: number;
}>;
refresh: () => Promise<{
customer: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
customerToken: string;
expiresIn: number;
}>;
};

Defined in: client.ts:208

Sales Customer Tokens methods

create

create: (request: {
proof: any;
}) => Promise<{
customer: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
customerToken: string;
expiresIn: number;
}>;

Exchange identity proof for customer token Exchange an identity proof (magic-link code or partner assertion) for a short-lived customer token bound to this channel. Identity is exchanged, never asserted.

Parameters
ParameterType
request{ proof: any; }
request.proofany
Returns

Promise<{ customer: { email: string; firstName: string | null; id: string; lastName: string | null; }; customerToken: string; expiresIn: number; }>

Operation Id

createSalesCustomerToken

refresh

refresh: () => Promise<{
customer: {
email: string;
firstName: string | null;
id: string;
lastName: string | null;
};
customerToken: string;
expiresIn: number;
}>;

Refresh a customer token Re-signs a still-valid customer token (presented via X-Customer-Token) for a fresh 30 minutes, carrying the original 24-hour absolute ceiling forward. Once the ceiling passes the customer must re-authenticate.

Returns

Promise<{ customer: { email: string; firstName: string | null; id: string; lastName: string | null; }; customerToken: string; expiresIn: number; }>

Operation Id

refreshSalesCustomerToken


salesListings

salesListings: {
list: () => Promise<{
channel: {
id: string;
name: string;
slug: string;
};
listings: {
currency: string | null;
eventId: string;
id: string;
imageUrl: string | null;
name: string | null;
nextOccurrenceAt: string | null;
priceFrom: number | null;
saleEndsAt: string | null;
saleStartsAt: string | null;
shortDescription: string | null;
subtitle: string | null;
venueCity: string | null;
venueName: string | null;
}[];
}>;
};

Defined in: client.ts:171

Sales Listings methods

list

list: () => Promise<{
channel: {
id: string;
name: string;
slug: string;
};
listings: {
currency: string | null;
eventId: string;
id: string;
imageUrl: string | null;
name: string | null;
nextOccurrenceAt: string | null;
priceFrom: number | null;
saleEndsAt: string | null;
saleStartsAt: string | null;
shortDescription: string | null;
subtitle: string | null;
venueCity: string | null;
venueName: string | null;
}[];
}>;

List active listings What is on sale through this channel right now. The channel is resolved from the key, never from a parameter.

Returns

Promise<{ channel: { id: string; name: string; slug: string; }; listings: { currency: string | null; eventId: string; id: string; imageUrl: string | null; name: string | null; nextOccurrenceAt: string | null; priceFrom: number | null; saleEndsAt: string | null; saleStartsAt: string | null; shortDescription: string | null; subtitle: string | null; venueCity: string | null; venueName: string | null; }[]; }>

Operation Id

listSalesListings


salesMyOrders

salesMyOrders: {
list: () => Promise<{
createdAt: string;
currency: string;
expiresAt: string | null;
id: string;
items: {
description: string | null;
name: string;
quantity: number;
subtotal: number;
type: string;
unitPrice: number;
}[];
orderNumber: string;
paymentStatus: string;
status: string;
subtotal: number;
tickets: {
admissionStatus: string;
barcode: string;
eventOccurrenceId: string | null;
holderName: string | null;
id: string;
name: string;
seatLabel: string | null;
status: string;
type: string;
}[];
total: number;
totalFees: number;
totalTax: number;
}[]>;
};

Defined in: client.ts:313

Sales My Orders methods

list

list: () => Promise<{
createdAt: string;
currency: string;
expiresAt: string | null;
id: string;
items: {
description: string | null;
name: string;
quantity: number;
subtotal: number;
type: string;
unitPrice: number;
}[];
orderNumber: string;
paymentStatus: string;
status: string;
subtotal: number;
tickets: {
admissionStatus: string;
barcode: string;
eventOccurrenceId: string | null;
holderName: string | null;
id: string;
name: string;
seatLabel: string | null;
status: string;
type: string;
}[];
total: number;
totalFees: number;
totalTax: number;
}[]>;

List my orders The verified customer's own orders. Requires a customer token - orders cannot be listed with key or possession credentials alone.

Returns

Promise<{ createdAt: string; currency: string; expiresAt: string | null; id: string; items: { description: string | null; name: string; quantity: number; subtotal: number; type: string; unitPrice: number; }[]; orderNumber: string; paymentStatus: string; status: string; subtotal: number; tickets: { admissionStatus: string; barcode: string; eventOccurrenceId: string | null; holderName: string | null; id: string; name: string; seatLabel: string | null; status: string; type: string; }[]; total: number; totalFees: number; totalTax: number; }[]>

Operation Id

listMySalesOrders


salesOrderPayments

salesOrderPayments: {
create: (orderId: string, request: {
paymentType?: "online_card" | "online_bank_transfer" | "online_wallet";
returnUrl?: string;
}) => Promise<{
amount: number;
connectedAccountId: string | null;
currency: string;
externalPaymentUrl: string | null;
id: string;
orderId: string;
paymentType: string;
providerClientSecret: string | null;
providerType: string | null;
publishableKey: string | null;
status: string;
}>;
};

Defined in: client.ts:362

Sales Order Payments methods

create

create: (orderId: string, request: {
paymentType?: "online_card" | "online_bank_transfer" | "online_wallet";
returnUrl?: string;
}) => Promise<{
amount: number;
connectedAccountId: string | null;
currency: string;
externalPaymentUrl: string | null;
id: string;
orderId: string;
paymentType: string;
providerClientSecret: string | null;
providerType: string | null;
publishableKey: string | null;
status: string;
}>;

Create order payment Initiate payment for the order's outstanding balance through the channel's payment provider

Parameters
ParameterType
orderIdstring
request{ paymentType?: "online_card" | "online_bank_transfer" | "online_wallet"; returnUrl?: string; }
request.paymentType?"online_card" | "online_bank_transfer" | "online_wallet"
request.returnUrl?string
Returns

Promise<{ amount: number; connectedAccountId: string | null; currency: string; externalPaymentUrl: string | null; id: string; orderId: string; paymentType: string; providerClientSecret: string | null; providerType: string | null; publishableKey: string | null; status: string; }>

Operation Id

createSalesOrderPayment


salesOrders

salesOrders: {
get: (orderId: string) => Promise<{
createdAt: string;
currency: string;
expiresAt: string | null;
id: string;
items: {
description: string | null;
name: string;
quantity: number;
subtotal: number;
type: string;
unitPrice: number;
}[];
orderNumber: string;
paymentStatus: string;
status: string;
subtotal: number;
tickets: {
admissionStatus: string;
barcode: string;
eventOccurrenceId: string | null;
holderName: string | null;
id: string;
name: string;
seatLabel: string | null;
status: string;
type: string;
}[];
total: number;
totalFees: number;
totalTax: number;
}>;
ticketPdf: (orderId: string, passId: string) => Promise<any>;
};

Defined in: client.ts:331

Sales Orders methods

get

get: (orderId: string) => Promise<{
createdAt: string;
currency: string;
expiresAt: string | null;
id: string;
items: {
description: string | null;
name: string;
quantity: number;
subtotal: number;
type: string;
unitPrice: number;
}[];
orderNumber: string;
paymentStatus: string;
status: string;
subtotal: number;
tickets: {
admissionStatus: string;
barcode: string;
eventOccurrenceId: string | null;
holderName: string | null;
id: string;
name: string;
seatLabel: string | null;
status: string;
type: string;
}[];
total: number;
totalFees: number;
totalTax: number;
}>;

Get order Get an order on this channel. Access requires a secret key (own channel), an X-Order-Access-Token header (guest possession) or a customer token (own orders).

Parameters
ParameterType
orderIdstring
Returns

Promise<{ createdAt: string; currency: string; expiresAt: string | null; id: string; items: { description: string | null; name: string; quantity: number; subtotal: number; type: string; unitPrice: number; }[]; orderNumber: string; paymentStatus: string; status: string; subtotal: number; tickets: { admissionStatus: string; barcode: string; eventOccurrenceId: string | null; holderName: string | null; id: string; name: string; seatLabel: string | null; status: string; type: string; }[]; total: number; totalFees: number; totalTax: number; }>

Operation Id

getSalesOrder

ticketPdf

ticketPdf: (orderId: string, passId: string) => Promise<any>;

Download a ticket PDF Render and stream a pass as a PDF ticket (application/pdf) for the holder. Order-access gated. Browsers fetch this directly rather than through the typed SDK.

Parameters
ParameterType
orderIdstring
passIdstring
Returns

Promise<any>

Operation Id

getSalesOrderTicketPdf


salesPresaleCodes

salesPresaleCodes: {
redeem: (request: {
code: string;
}) => Promise<{
alreadyHeld: boolean;
benefit: string;
}>;
};

Defined in: client.ts:446

Sales Presale Codes methods

redeem

redeem: (request: {
code: string;
}) => Promise<{
alreadyHeld: boolean;
benefit: string;
}>;

Redeem presale code A verified customer redeems a presale code for its benefit; gated pricing unlocks immediately. Requires a customer token.

Parameters
ParameterType
request{ code: string; }
request.codestring
Returns

Promise<{ alreadyHeld: boolean; benefit: string; }>

Operation Id

redeemSalesPresaleCode


salesRefundRequests

salesRefundRequests: {
create: (orderId: string, request: {
reason?: string;
type: "refund" | "exchange";
}) => Promise<{
createdAt: string;
id: string;
orderId: string;
reason: string | null;
status: string;
type: string;
}>;
};

Defined in: client.ts:381

Sales Refund Requests methods

create

create: (orderId: string, request: {
reason?: string;
type: "refund" | "exchange";
}) => Promise<{
createdAt: string;
id: string;
orderId: string;
reason: string | null;
status: string;
type: string;
}>;

Request refund or exchange File a refund or exchange request for the order within the resolved refund policy. Requester identity is derived from the credential, never from the body.

Parameters
ParameterType
orderIdstring
request{ reason?: string; type: "refund" | "exchange"; }
request.reason?string
request.type"refund" | "exchange"
Returns

Promise<{ createdAt: string; id: string; orderId: string; reason: string | null; status: string; type: string; }>

Operation Id

createSalesOrderRefundRequest


session

session: {
current: () => Promise<any>;
end: () => Promise<any>;
start: (request: {
channelKey?: string;
domain?: string;
}) => Promise<any>;
};

Defined in: client.ts:514

Session methods

current

current: () => Promise<any>;

Get the current session Returns the current session’s customer and cart state.

Returns

Promise<any>

Operation Id

getLiveSession

end

end: () => Promise<any>;

Destroy the current session Signs out and drops the current session.

Returns

Promise<any>

Operation Id

deleteLiveSession

start

start: (request: {
channelKey?: string;
domain?: string;
}) => Promise<any>;

Bootstrap a Live session Resolves the channel and mints a session that holds the channel’s publishable key server-side. Hosted callers (channel resolved from the Host header or an explicit domain) receive an httpOnly cookie; embed callers (providing a channelKey) receive the session id in the body.

Parameters
ParameterTypeDescription
request{ channelKey?: string; domain?: string; }-
request.channelKey?stringDescription Embed mode: the channel publishable key (tlpk_…). When omitted, the channel is resolved from the Host header (hosted mode). Example tlpk_live_abc123
request.domain?stringDescription Hosted mode: an explicit domain to resolve the channel from, overriding the Host header. Example tickets.example.com
Returns

Promise<any>

Operation Id

createLiveSession