Jetron TicketFluid

Quickstart

Make your first Jetron Fluid request in a few minutes.

Get an API key

Jetron Fluid uses public API keys in the format jt_public_.... Get yours from your Jetron Ticket host dashboard. Every request is automatically scoped to the event host that owns the key. See Authentication.

Make your first request

List your public events:

npm install @jetronticket/api
import { createClient } from '@jetronticket/api'

const client = createClient({
  apiKey: 'jt_public_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx',
})

const { data: events } = await client.listEvents({ limit: 20 })
console.log(events)

Successful responses are wrapped in an envelope. The SDK unwraps it for you; over raw HTTP it looks like:

{
  "data": {
    "events": [{ "slug": "my-event", "name": "My Event" }],
    "nextCursor": null
  },
  "status": true
}

Reserve tickets

Reservations price the cart and hold stock for a limited window:

const { data: reservation } = await client.createReservation('my-event', {
  items: [{ sku: 'ticket-type-uuid', quantity: 2 }],
})

// Keep these: you need them at checkout
reservation.reservationToken
reservation.quoteReference
reservation.clientExpiresAt // drive a countdown in your UI

Create the order

Complete checkout by echoing the reservationToken as the X-Device-ID header and sending the quoteReference back:

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',
  },
  { deviceId: reservation.reservationToken }, // sent as X-Device-ID
)

if (order.status === 'pending_payment') {
  window.location.href = order.checkoutUrl // redirect to the payment gateway
}

Paid orders return status: "pending_payment" and a checkoutUrl to redirect the attendee to. Free orders are confirmed immediately.

Build with an AI assistant

These docs are also published as plain text, so you can hand them to an AI assistant instead of copying snippets across by hand.

AddressWhat you getSize
/llms.txtAn index: every page with its description and linkSmall
/llms-full.txtThe full text of every page, in one fileLarge

Use llms.txt with an assistant that can browse. It gives it a map of the docs so it can go and read only the pages it needs. Use llms-full.txt when you would rather paste everything in at once, or save a copy to work offline.

For a single page, every page in these docs has a Copy Markdown button at the top. The Open menu beside it links to that page's raw markdown, which is handy when you want to point an assistant at one topic rather than all of them.

Ask about your own integration

The docs include working code for both the embed and the API, so an assistant that has read them can usually scaffold your checkout page and your webhook receiver without you dictating the details.

Next steps

On this page