Seat selection and reservation is the part of a ticketing system that shows which seats are free at this moment and locks the seats a buyer chooses for a few minutes, while the buyer pays. During those minutes, no one else can buy those seats. If the payment succeeds, the seats are sold. If it fails, or the time runs out, the seats become free again. The lock is often called a seat hold or a temporary reservation.
Why is this hard? On a busy day, two buyers may choose the same seat within the same second. If both were allowed to pay, the venue would have sold one seat twice. So every seat has a status in a database: free, held or sold. Changing a seat from free to held must be done in one indivisible step. The database checks that the seat is still free and marks it held in the same operation. If two requests arrive together, only one can succeed. The other buyer sees a message that the seat has just been taken.
Say two people in Pune both want seat G12 for a Marathi play, at ₹650. The theatre has 480 seats. At 7:02:15 in the evening, both of them tap G12 on the seat map. The first request reaches the system a few milliseconds earlier. The system marks G12 as held for that buyer, with an expiry time of 8 minutes, which is 7:10:15. The second request finds G12 already held and is refused, and the second buyer chooses G13 instead. The first buyer goes to the payment gateway and pays by UPI. At 7:04:40, the payment gateway confirms the payment. The system changes G12 from held to sold, and the ticket is issued. If the buyer had closed the app instead, G12 would have become free again at 7:10:15.
There is one awkward case. Sometimes a payment succeeds, but the confirmation reaches the ticketing system only after the hold has expired, and someone else has already bought the seat. The system must then either offer another seat or refund the money automatically. Good systems keep a record of every hold and every payment, so that no buyer pays without getting a ticket.
How long should a hold last? If it is too short, buyers who pay slowly lose their seats. If it is too long, seats sit locked by people who never pay, while others are told the show is full. Most platforms choose a few minutes. During a big sale, when demand is an example of high concurrency, the virtual waiting room lets in only as many buyers as the seat system can handle. The online ticketing platform shows the result of all this to the buyer as grey, green and selected seats.