Overview
@jetronticket/api, a typed zero-dependency client for Jetron Fluid.
@jetronticket/api is the
official TypeScript client for Jetron Fluid. It wraps the REST endpoints as
typed functions using the platform fetch, so it runs in browsers and
Node.js 20+ with no dependencies. It ships ESM and CJS builds with full type
declarations, and mirrors the OpenAPI spec exactly.
Install
npm install @jetronticket/apiQuick start
import { createClient } from '@jetronticket/api'
const client = createClient({
apiKey: 'jt_public_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
})
// Browse events (data is unwrapped from the response envelope)
const { data: events } = await client.listEvents({ limit: 20, q: 'jazz' })
// Checkout flow
const { data: reservation } = await client.createReservation('my-event', {
items: [{ sku: 'ticket-type-uuid', quantity: 2 }],
})
const { data: order } = await client.createOrder('my-event', {
quoteReference: reservation.quoteReference,
email: 'attendee@example.com',
firstName: 'Kendall',
lastName: 'Roy',
callbackUrl: 'https://your-site/checkout/callback',
})
if (order.status === 'pending_payment') {
window.location.href = order.checkoutUrl // open the hosted payment page
}In the browser, the SDK creates and stores the attendee's device ID for you, so
the reservation and the order are linked automatically. On a server, pass the
reservation's reservationToken as deviceId; see
Device IDs.
Guides
Client & methods
createClient options and every method's signature.
Checkout walkthrough
Reserve, collect details, order, and handle the redirect.
Sales
Countdowns, presale passwords, and waitlists.
Add-ons
Sell extras such as parking or merch, with tickets or on their own.
Attendee tickets
Show signed-in attendees their tickets, add-ons and QR codes, from your server.
Error handling
Catching ApiError and branching on error codes.
Conditional requests
ETag caching with ifNoneMatch and notModified.

