TktPlz uses Razorpay as its payment gateway. The payment flow is: create an order (server-side), complete payment in the Razorpay checkout (client-side), then verify the HMAC-SHA256 signature (server-side). On successful verification, the booking is finalised and tickets are issued. Refunds are processed back through Razorpay and tracked in theDocumentation 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.
refunds table.
POST /api/payment/createOrder
Creates a Razorpay order. This endpoint runs thegetPrices and calculateTicketPrices middlewares before the controller, so the request body must include the same fields required by the booking summary endpoint.
Items must already be locked via
POST /api/booking/get-booking-summary before calling this endpoint. The convenience fee is calculated in the calculateTicketPrices middleware.UUID of the event.
UUID of the user making the purchase.
"Seating", "Open", "Online", or "Registration".Seat UUIDs for Seating events, or
{ type, count } objects for other types.Array of seat UUIDs — required for Seating events.
Object containing at least
{ type } — required for Open and Online events.Array of
{ id, type, count, price } — required for Open and Online events.true on success.Razorpay order ID to pass to the Razorpay checkout SDK.
Total amount in INR (not paise).
Always
"INR".Razorpay receipt string in the format
order_{eventId[:6]}_{userId[:6]}_{timestamp}.POST /api/payment/verifyPayment
Verifies the Razorpay payment signature using HMAC-SHA256 and, on success, completes the booking by creating aCONFIRMED ticket record.
The Razorpay order ID returned from
createOrder.The Razorpay payment ID from the checkout callback.
The HMAC-SHA256 signature from the checkout callback.
UUID of the event.
UUID of the user.
Seat UUIDs — for Seating events.
Event metadata — for Open/Online events.
Ticket categories — for Open/Online events.
Grand total in INR.
Convenience fee total.
POST /api/payment/refund
Initiates a refund for aCONFIRMED ticket via Razorpay. The ticket status is updated to "CANCELLED - REFUND DUE" immediately, then an async refund is created. A confirmation email is sent to the user.
The Razorpay order ID associated with the ticket to refund.
Amount to refund in INR. Defaults to the full
totalAmount on the ticket. Cannot exceed the original ticket amount.True on success.
Human-readable status message.
GET /api/payment/payout-summary
Requires admin authentication (
moderator role).GET /api/payment/payout/:id
Returns details for a single payout record, enriched with event and organiser names.UUID of the payout record.
Payout UUID.
Associated event UUID.
Organiser UUID.
Total revenue collected (decimal string).
Platform deductions (decimal string).
Amount payable to the organiser.
"pending", "paid", or "cancelled".Payment method used:
"UPI", "Bank Transfer", or "RazorpayX".ISO 8601 timestamp when payout was marked paid.
Whether the organiser can see this payout in their dashboard.
JSON blob of ticket details included in the payout calculation.
Resolved event name.
Resolved organiser name.
POST /api/payment/payout/:id/mark-as-paid
Requires organiser authentication (
organiser role). Also requires a verificationText that must match the server-side VERIFICATION_TEXT environment variable.paidAt timestamp.
UUID of the payout to mark as paid.
Server-side verification string. Must match the
VERIFICATION_TEXT environment variable.