Bookings are created for a given availability slot.

The booking object represents the reservation made at a restaurant or bar.

Bookings are created by posting the details of a chosen Availability Slot along with a set of user details.

Some bookings are confirmed immediately, whilst others may require the venue to confirm the booking asynchronously. In addition, some bookings will require a successful payment. Such flows will be indicated by the selected Availability Slot.

Booking Object

PropertyTypeDescription
idstringThe unique identifier of the booking.
dateTimeDateThe date and time of the booking.
coversnumberThe number of guests booked.
bookedAtDateThe date and time when the booking was made.
statuscompleted, noShow, cancelled, requested, pendingPayment, upcomingThe status of the booking (e.g., confirmed, cancelled).
tag?stringAn optional tag associated with the booking.
originalEmailstringThe email address used for the original booking.
venue.idstringThe unique identifier of the venue.
venue.namestringThe name of the venue.
venue.town?stringThe town where the venue is located (optional).
usersobject[]A list of users associated with the booking.
users[].idstringThe unique identifier of the user.
users[].isOwnerbooleanIndicates if the user is the owner of the booking. At least one user must be the owner of the booking.
users[].email?stringThe email address of the user (optional).
users[].phone?stringThe phone number of the user (optional).
users[].firstName?stringThe first name of the user (optional).
users[].lastName?stringThe last name of the user (optional).
partner.idstringThe unique identifier of the booking partner.
partner.namestringThe name of the booking partner.
partner.logoUrl?stringThe logo URL of the booking partner (optional).
deposit?objectInformation about the required deposit for the booking (optional).
deposit.amountUnitsnumberThe amount of the deposit in units (e.g., minor currency units like cents).
deposit.amountPer'guest'Indicates that the deposit amount is applied per guest.
deposit.currencyCurrencyThe currency of the required deposit.
deposit.terms?stringThe terms and conditions of the deposit (optional).

Payments For Bookings

Some availability slots indicate a payment is required for a booking. AllTheTables uses Stripe to process payments before placing the booking at the restaurant.

Working with Stripe to process payments

The public key used to tokenise a card with the Stripe SDK or API can be found at:

GET /partner/stripe/publishable-key

{
  publishableKey: "pk_stripe_public_key"
}

Capturing a Payment

To create a Payment Intent, post the booking with the status pendingPayment. The response will include a booking with the pendingPayment status and a paymentIntent object in the response.

The paymentIntent should be used with the Stripe SDK or Stripe API to authorise a payment. Upon successful processing of the payment, AllTheTables will automatically fulfil the booking via the restaurant reservation book. There's no need to update AllTheTables that the payment was successful, as Stripe does this automatically.

Until a payment is captured, the booking will appear with the status pendingPayment.