The following list outlines a sample flow in a typical booking lifecycle:
Get a list of services from one of:
Allow the customer to select a service.
Get available slots by calling getServiceAvailability() (SDK | Velo),
specifying the selected service ID as _id
. Optionally, you can specify a
AvailabilityOptions
object to change the limits on the slots that are
returned.
You can match the returned slots to their related staff member items using the Bookings/Staff collection.
The customer selects a slot.
Gather values for the selected service's form fields, if there are any. The list of form fields is found in the form property of the items in the Bookings/Services collection.
Get the available payment options for the currently logged-in user and the selected service with getCheckoutOptions() (SDK | Velo).
The customer selects a payment option (offline, online, a pricing plan package, or a pricing plan membership).
Call checkoutBooking() (SDK | Velo). Specify the selected slot object, the values for the form fields, and the payment type if necessary. Note that the specified payment type must match the service's configuration in the site's dashboard. You cannot book a paid service as if it were free.
paymentOptions
object.paymentOptions
object indicating the payment should be online, a payment popup is presented
for the user to enter payment information, such as credit card details.paymentOptions
object indicating the payment should be offline, the payment popup is not
presented to the user.