Restore a Seat Cart After a Page Reload
Persist a booking-session id, reload the server-held cart, handle expired or frozen states, and show buyers which seats they still own after a refresh.
Handle a seat upgrade with server-held inventory: check cart capacity, hold the replacement, release the old seat, recalculate the total and handle conflicts.
A buyer holds Stalls C12 and asks for B12. The map can highlight B12 immediately, but the order must not promise it until inventory accepts the change. A booking session gives your page a server-held cart for one event; it does not provide an atomic two-seat exchange or adjust a payment for you.
ACTIVE, contains C12 and has time left. Keep C12 visible as held while the buyer considers B12.maxSeats from session creation. Holding B12 before releasing C12 temporarily uses one extra place. If the cart is already at its limit, do not start a hold-first swap that the session must reject.lock for B12. A successful response is the first point at which you may show B12 as held. On a 409 conflict, keep C12 and show which proposed seat was unavailable.unlock for C12, then redraw from the returned cart and total. The brief interval between calls can contain both seats; do not mistake that interim total for the amount to charge. If the second call fails or its result is unclear, call get before offering checkout.checkout to freeze the cart for payment. Your backend still owns payment, order changes and final confirmation.Suppose C12 is €60 and B12 is €80. During a hold-first change, the interim cart may total €140. The final one-seat cart should total €80. Display the final server response and your own order calculation, including any fees or taxes, before asking for payment.
When maxSeats leaves no spare place, a release-first attempt can free C12 before B12 is acquired. B12 may then be taken by another buyer, and C12 may no longer be recoverable. State that risk in the interface and let the buyer keep the current seat or start a new selection. Do not label two separate API calls a guaranteed swap. For a paid order, use your platform’s separate exchange and refund policy rather than reopening a finished cart in the browser.
| Result | What the booking page should do |
|---|---|
| Replacement hold refused | Keep the original held seat and explain the conflict. |
| Session expired or cancelled | Clear the old selection, explain that inventory was released, and start a new session if the buyer continues. |
Session PENDING_PAYMENT |
Stop seat editing; the cart is frozen. Use an explicit start-over flow if payment is abandoned. |
| Uncertain result after a network failure | Fetch the session again and render its actual cart before any retry. |
Test these four cases with your payment handoff before enabling a seat-change button. If your current checkout cannot explain the cart’s intermediate state, book a demo with the exact exchange flow you want buyers to use.
Persist a booking-session id, reload the server-held cart, handle expired or frozen states, and show buyers which seats they still own after a refresh.
Model boxes, balconies and standing room once, then set prices and holds for each performance. Use this theater seat-map checklist before a run goes on sale.
How long a 34,476-seat stadium takes to open in Seatmap Pro, how zoom holds 60 fps on a mid-range Android phone, and what changed after a mobile memory incident.