Takes over a Collins booking that DesignMyNight (DMN) made itself once the guest paid its deposit, so your channel owns it now instead of when the next booking sync (every 10 minutes) imports it as a booking DMN made. For a booking type with a deposit the booking widget doesn't create the booking: the guest pays against a DMN pending booking (a basket, nothing on the diary), and DMN makes the real booking, already confirmed, once Stripe has taken the deposit. So an abandoned checkout never holds a table. Call this with what DMN's checkout gave you: /checkDeposit returned successful: true and booking.bookingId.
Before anything is stored, Bookable verifies the booking with DMN rather than trusting the request:
- Paid for: Bookable asks DMN's checkout itself (
/checkDeposit) which booking it made for pendingBookingId once paymentIntentId was paid. It must be bookingId. Neither id is on the booking, so only the caller that ran the checkout can name it. Otherwise 422 BOOK-N-047. - The booking: read with the operator's own Collins account, it must be at this operator, of the venue and booking type in
compositeId, confirmed, with a paid deposit, made within the last hour, and on the date, time and partySize sent, for the guest email sent. Otherwise 422 BOOK-N-048, whose detail names what differs.
Then the booking is stored as the sync stores one, under your channel, marked as made through Bookable by you, and your channel's booking webhooks fire as for POST /venues/{compositeId}/booking (bookingCreated, not echoed to you). It stays Confirmed: the deposit is paid, so there is no payment link. Bookable also writes your channel's partner source onto the booking in Collins, as a create does.
What DMN's pending flow can't carry is applied here, checked exactly as on create: acceptedPolicyIds (every booking policy that applies must be accepted, else 400 BKRUL-N-009), marketingAnswers, answers to the booking type's questions and dateOfBirth (422 BOOK-N-038 to BOOK-N-041), and notes (added only when the booking has none, as DMN's checkout may have taken them). They are written to the booking in Collins and kept with it in Bookable. Rules about what may be booked (availability, booking windows) are not checked: DMN made and took payment for the booking. Validate the guest's answers and policies before taking payment: a refusal here leaves the paid booking with DMN (the sync imports it as a DMN booking) until you call again with corrected values.
preorders (the same shape as on create, from the slot's preOrderItems) is added once the booking is taken over, exactly as PATCH /venues/bookings/{bookingId} adds one: checked against the venue's pre-order catalogue and rules, written to the booking in Collins and the pre-order email sent. DMN's checkout charged the deposit only, so anything a pre-order costs is paid at the venue. Because it is an amend, the amend's pre-order rules apply (an amend cut-off or locked pre-order edits can refuse it). A refused pre-order, or a Collins error while adding it, doesn't fail the request: the booking is still taken over and answered without preorders, so tell the guest their pre-order wasn't added. Send the same request again with a corrected preorders to add it. A booking that already has a pre-order keeps it and preorders is ignored.
Safe to repeat: once your channel holds the booking, the same request answers 200 with it and changes nothing, except that preorders is added as above when the booking has no pre-order yet. A booking made or taken over through Bookable by another channel is 409 BOOK-N-002. If Bookable can't reach DMN's checkout, nothing is taken over and the answer is 503 BOOK-R-007: retry. Only for Collins booking types (400 BOOK-N-049), and only in an environment whose DMN checkout and Collins account are the same DMN (production).