How to cancel a booking, check for penalties, and handle cancellation policies.
Cancelling a booking is a two-step process: first retrieve the cancellation quote to know the financial consequences, then submit the cancellation with a reason.
Four statuses accept cancellation: CONFIRMED, REQUESTED,
PENDING_MERCHANT_CONFIRMATION and PENDING_WAIT_LIST_BOOKING. Any other
returns HTTP 409 STATUS_NOT_VALID_TO_UPDATE_PUBLIC_BOOKING.Leaving the wait list is this same endpoint — a PENDING_WAIT_LIST_BOOKING
booking cancels like any other. Word it differently for the customer, though:
they are giving up a place in a queue, not cancelling a table they had.
Endpoint:Get Cancel Booking DetailsRead-only — no changes are made to the booking.If cancellationPolicyQuote is null, the booking has no cancellation policy and the customer can cancel freely.If cancellationPolicyQuote is present, check isPenalizable to determine what to show the customer:
isPenalizable: false — no charge applies yet. Show cancellationDeadlineAt so the customer knows how long they have to cancel for free.
isPenalizable: true — a penalty applies. Show cancellationFeeAmount and obtain the customer’s confirmation before proceeding.
Penalty conditions change over time. If significant time passes between
showing the quote and the customer confirming, refresh the quote before
submitting the cancellation.