Ticket Schema
v0.1 draft

Simple, validatable digital tickets.

Ticket Schema is an open JSON Schema standard for digital tickets, receipts, and proofs of transaction. It replaces paper with portable documents that are easy to validate and render.

Important: Ticket Schema is designed for non-fiscal documents. It does not replace invoices, tax receipts, or documents required by a tax authority.

What you can do

The main actions are separated so you do not have to scan the full documentation.

Validate

Check whether a document complies with a Ticket Schema profile.

Open validator →

Explore examples

Browse retail tickets, payments, deliveries, loans, and service records.

Open examples →

Preview

Render JSON as a lightweight ticket for an iframe or web view.

Open preview →

Quickstart

A minimal flow for integrating Ticket Schema into an app.

1. Create a document

Generate JSON compatible with one of the v0.1 profiles.

{
  "$schema": "https://ticketschema.org/schema/v0.1/profiles/retail-receipt.json",
  "ticketSchemaVersion": "0.1",
  "documentType": "retail_receipt",
  "status": "paid",
  "currency": "MXN",
  "amounts": { "total": 86, "paid": 86, "balance": 0 }
}

2. Validate it

POST https://ticket-schema.pages.dev/api/validate
content-type: application/json
{ "valid": true, "errors": [] }

3. Get HTML inside JSON

POST https://ticket-schema.pages.dev/api/render
content-type: application/json

{
  "document": { "...": "Ticket Schema JSON" }
}
{
  "valid": true,
  "errors": [],
  "html": "<div class=\"ticket-schema-render\">...</div>"
}

4. Get direct HTML

POST https://ticket-schema.pages.dev/api/render/html
content-type: application/json

{
  "document": { "...": "Ticket Schema JSON" }
}

Returns text/html, ready to preview or embed.

5. URL embed

If the document is already published as JSON, use the embeddable renderer.

https://ticket-schema.pages.dev/render/?src=/examples/v0.1/retail-receipt-mx.json
<iframe src="https://ticket-schema.pages.dev/render/?src=/examples/v0.1/retail-receipt-mx.json"></iframe>