Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/Sumitbose5/tktplz/llms.txt

Use this file to discover all available pages before exploring further.

TktPlz gets you from zero to a confirmed ticket in four straightforward steps. Whether you sign up with your email or continue with Google, the checkout process is the same: find an event, lock your seats, pay, and collect your QR ticket.
1

Create an account

Open tktplz.me and click Login / Register in the top navigation. You have two options:Email + OTP (no password required)Enter your name and email address on the registration form. TktPlz calls POST /api/auth/user-reg in the background and sends a six-digit OTP to your inbox.
POST /api/auth/user-reg
Content-Type: application/json

{
  "name": "Ada Lovelace",
  "email": "ada@example.com"
}
A modal with six input boxes appears automatically. Type each digit — the form submits as soon as the sixth digit is entered and calls POST /api/auth/verify-otp.
POST /api/auth/verify-otp
Content-Type: application/json

{
  "email": "ada@example.com",
  "inputOtp": "482910"
}
On success the server sets a JWT cookie and returns your role (user, organiser, or moderator). You are redirected to your original destination automatically.Google OAuth (one click)Click Continue with Google on either the login or register modal. You are redirected to GET /api/auth/google, which hands off to Passport’s Google OAuth 2.0 strategy. After you approve access in your Google account, the callback at GET /api/auth/google/callback creates or retrieves your account and redirects you back to the app.
Already have an account? Use Login instead of Register. Enter your email, receive a fresh OTP, and verify it — the flow is identical.
2

Browse and find events

After signing in you land on the home page, which lists events grouped by category: movies, concerts, fests, and online shows. You can also filter by subtype using the API endpoint GET /api/event/get-events-type/:subtype that powers the category pages.To view the full catalogue, the frontend calls:
GET /api/event/get-all-events
Each event card shows the poster (served from Cloudinary), the venue or format, the date, and the starting ticket price. Click any card to open the event detail page, which loads data from:
GET /api/event/get-event/:eventId
Seating events show a real-time seat map. As other users lock seats, the map updates live via Socket.IO so you always see current availability before you commit.
3

Select seats and view the booking summary

The seat selection experience differs slightly by event type:Seating events (cinema-style)The seat map renders all rows and seats. Seats already locked by other users appear in a different colour — their status is fetched from:
GET /api/event/get-booked-seats/:eventId
GET /api/booking/get-locked-seats/:eventId
Click one or more available seats. The moment you select a seat, TktPlz locks it for you by calling:
POST /api/booking/get-booking-summary
Content-Type: application/json

{
  "eventId": "evt_abc123",
  "seats": ["A1", "A2"],
  "userId": "usr_xyz"
}
This endpoint runs the getPrices and lockItems middleware in sequence before returning the summary. The lock is also broadcast to all users watching the same event room via Socket.IO (seats-unlocked / bookingUpdate events), so the map stays accurate for everyone.Open-zone events (concerts, festivals)Choose a zone and the number of tickets you want. Ticket availability is checked against the zone capacity in real time.Online and registration eventsSelect the ticket tier or fill in the registration form fields returned by POST /api/event/get-reg-fields. No seat map is shown.After selection, the booking summary panel displays:
  • Event name, date, and venue
  • Seat numbers or ticket types
  • Base price per ticket
  • Convenience fee
  • Total amount due
If you change your mind, leaving the page or clicking Cancel calls POST /api/booking/unlock-items, which releases your seat locks immediately so other users can claim them.
4

Complete payment via Razorpay

Click Proceed to Payment on the booking summary screen. TktPlz creates a Razorpay order server-side:
POST /api/payment/createOrder
Content-Type: application/json

{
  "eventId": "evt_abc123",
  "seats": ["A1", "A2"],
  "userId": "usr_xyz"
}
The getPrices and calculateTicketPrices middleware run first to ensure the amount shown in the UI matches what is charged. Razorpay’s checkout modal then opens in the browser. Complete the payment using UPI, card, net banking, or wallet.After the modal closes, the frontend sends the Razorpay paymentId, orderId, and signature to:
POST /api/payment/verifyPayment
Content-Type: application/json

{
  "razorpay_order_id": "order_abc",
  "razorpay_payment_id": "pay_xyz",
  "razorpay_signature": "..."
}
The backend verifies the HMAC signature. A mismatch returns an error and the booking is not confirmed.
If you need to cancel after payment, refunds are processed through POST /api/payment/refund. Refund status updates arrive via the webhook at POST /api/payment/webhook/refund.
5

Receive your QR ticket

On successful payment verification, TktPlz generates your ticket and stores it in the database. Your QR-code ticket is available immediately in the My Tickets section of your profile.The QR code encodes your booking ID and is rendered using qrcode.react in the browser. It works offline — screenshot it or save it before you head to the venue.At the venue, the organizer’s staff scans the code using TktPlz’s built-in QR scanner. The scanner calls the ticket validation endpoint, marks the ticket as visited, and grants entry in seconds.
Keep the QR code at full brightness and avoid cropping it when you screenshot. The scanner needs to see the full code including the quiet zone around the edges.

What’s next

Platform architecture

Learn how the frontend, backend, real-time layer, and queue system fit together.

Event types

Understand the four event formats: Seating, Open-zone, Online, and Registration.

Payments and refunds

How Razorpay orders, verification, and refund webhooks work end to end.

API reference

Full endpoint reference for integrating TktPlz into your own applications.

Build docs developers (and LLMs) love