Jetron TicketFluid

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/api

Quick 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

On this page