API reference

Base URL: https://your-app.netlify.app/api/v1. All requests require x-tixcore-key. All money is in minor units (paise/cents).

POST/orders/create

Create an order on the org’s gateway. Returns the public key and order id needed to open checkout.

json
// request
{
  "eventId": "evt_champions_final",
  "items": [{ "ticketTypeId": "tt_vip", "quantity": 2 }],
  "buyer": { "name": "A. Sharma", "email": "[email protected]" },
  "couponCode": "EARLYBIRD"   // optional
}

// response
{
  "orderId": "ord_…",
  "providerOrderId": "order_NXx…",
  "amountMinor": 500000,
  "currency": "INR",
  "publicKey": "rzp_live_…",
  "provider": "RAZORPAY"
}
POST/payments/verify

Verify the gateway signature after checkout. On success, tickets are issued and returned.

json
// request
{
  "orderId": "ord_…",
  "providerPaymentId": "pay_…",
  "providerOrderId": "order_…",
  "signature": "…"
}

// response
{
  "status": "PAID",
  "tickets": [
    { "ticketNumber": "TIX-7F3A-0001", "ticketType": "VIP" }
  ]
}
GET/tickets/:id

Fetch a single ticket and its QR + download links.

json
{
  "ticketNumber": "TIX-7F3A-0001",
  "status": "VALID",
  "holderName": "A. Sharma",
  "ticketType": "VIP",
  "downloads": { "pdf": "https://…", "png": "https://…" }
}
POST/tickets/verify

Verify a scanned QR token and mark attendance atomically. Used by the scanner; also callable from your own hardware.

json
// request
{ "eventId": "evt_…", "qrToken": "eyJ…", "gate": "North 4" }

// response
{ "result": "VALID", "ticketNumber": "TIX-7F3A-0001", "ticketType": "VIP" }
// result ∈ VALID | ALREADY_USED | INVALID | EXPIRED | WRONG_EVENT
GET/analytics

Aggregate sales, revenue, check-ins, and per-ticket-type breakdowns for the organization or a single event (?eventId=).

json
{
  "ticketsSold": 468,
  "checkedIn": 311,
  "revenueMinor": 4600000,
  "byType": [{ "name": "VIP", "sold": 64 }]
}

Errors

Errors return a non-2xx status and a JSON body { "error": "message" }. Common codes: 401 (bad/missing key), 403 (revoked key or wrong org), 404 (not found), 422 (validation), 429 (rate limited).