Download the ticket PDF

Returns the booking's ticket PDF as the response body (application/pdf), containing every ticket in the booking. The response is the file itself, not JSON. Each request returns the current PDF, so ticket changes (for example attendee updates) are reflected on the next download. This endpoint requires your API key, so never call it from a browser, mobile app, or email link - proxy it through your own server instead: your user clicks a download button in your app, your server calls this endpoint and streams the file back. To link to the PDF from an email or host it at a stable URL, download it and attach or re-host it yourself. Returns 404 when no PDF exists, for example when the booking is unpaid or abandoned.

GET/v1/bookings/:bookingId/ticket-pdf

Authorization

api_key_auth
AuthorizationBearer <token>

API key authentication. Use "Bearer YOUR_API_KEY" format.

In: header

Path Parameters

bookingIdstringrequired

The ID of the booking to retrieve. Use the list bookings endpoint first if you need to discover a booking ID by email, name, customer, event, or date range.

^[0-9a-fA-F]{24}$

Query Parameters

livemodestring

Set to false to return test-mode records created while a page was in test mode. Defaults to the mode of the API key. Test API keys can only read test data.

truefalse

Returns

The ticket PDF fileapplication/pdf

string

The ticket PDF binary.

binary

Bad request - Invalid request parameters

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Unauthorized - Missing or invalid API key

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Forbidden - Insufficient permissions or validation error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Booking or ticket PDF not found

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

Rate Limit Exceeded - Please try again later.

  • messagestring

    Human-readable error message.

Internal server error

  • statusstring

    Indicates the request failed.

    error
  • typestring

    Machine-readable error category.

  • messagestring

    Human-readable error message.

  • Optional validation details for invalid requests.

import { createCheckoutPageClient } from '@checkoutpage/sdk';const checkoutpage = createCheckoutPageClient({  apiKey: process.env.CHECKOUTPAGE_API_KEY!,});const response = await checkoutpage.bookings.downloadTicketPdf('6812fe6e9f39b6760576f01c');
"string"
{
  "status": "error",
  "type": "ValidationError",
  "message": "Bad request - Invalid body: Field 'email' must be a valid email address",
  "errors": [
    {
      "param": "email",
      "message": "must be a valid email address"
    }
  ]
}
{
  "status": "error",
  "type": "error",
  "message": "Missing or invalid API key"
}
{
  "status": "error",
  "type": "error",
  "message": "Insufficient permissions requires: BOOKINGS_WRITE"
}
{
  "status": "error",
  "type": "error",
  "message": "Ticket PDF not found"
}
{
  "message": "API key rate limit exceeded. Please try again later."
}
{
  "status": "error",
  "type": "error",
  "message": "Internal server error"
}