About the Bookings API

Use this API to manage bookings to a site's services.

A booking is an entity that represents a session that was ordered (but not necessarily paid for) for a specific time and rate for a specific customer. A customer can book a single class or an appointment (= session), or book an bundle of sessions at once, e.g., a course (= schedule).

Note:
A booking that has not been paid for (when the service requires payment) will be created with status = PENDING. A booking that requires business approval will be created with status = PENDING CHECKOUT.

A booking contains the following:

  • Customer information: Contact details (contact ID, name, email, address, phone number), and any additional fields set by the owner - under formInfo.
  • Booked session details: Session name, date, start & end time, location and rate.
  • Payment details: Final price that the customer is being charged, payment option the customer chose when booking (online payment, in-person payment, membership) and the payment method used in case of an online payment (e.g., credit card, Paypal). Will also contain coupon code if entered during checkout.
  • Status: Current booking status (confirmed, declined, canceled, etc.).

Terminology

  • Visitor: Anyone who is not registered as a member in the Wix site (upon booking, visitors are registered as contacts).
  • Member: Someone who is registered as a member in the Wix site.
  • Owner: The Wix site owner (who has Wix Bookings installed).
  • Slot: An available period of time in a schedule that can be booked by a customer. While this includes existing sessions that are available for booking, it can also represent a period of time that can be booked based on the availability of a resource (e.g., a barber with appointments of 30 minutes each that are open for booking every weekday between 8:00 - 17:00). These slots are calculated by the constraints of the schedule.
  • Wix Paid Plans: A pre-paid bundle of services or membership including access to certain services. Access a member's pricing plans by calling the Checkout Options endpoint with the member's contact ID.

Bookings Statuses

Each booking has a status. Statuses include:

  • Confirmed: When the session is free, when payment is expected in person, or when online payment was approved.
  • Pending: When a booking requires the owner's approval, it is "pending" until the owner either confirms or declines the booking. In addition, if a customer is booked to a waitlist, the booking will be "pending" until it is added to the session.
  • Pending Checkout: When the booking's online payment is waiting for payment approval. Will automatically change to "confirmed" when the payment is approved.
  • Declined: When the owner has declined a booking that requires their approval.
  • Canceled: When the customer or the business owner has canceled the previously confirmed booking.

Use Cases

Book a visitor (i.e., anyone, not necessarily known to the site owner in advance) to a given service, including payment

  1. To display the various services available for booking on your platform, call the List Services endpoint.
  2. When a visitor selects a service, call List Slots to display the sessions available for booking.
    2a. Provide the visitor with a form to fill out that matches the data required in this session's form, as returned in the List Services response.
  3. When a visitor selects a slot to book, call Checkout Options to display the payment options available for this service. At this time, payment via WixPayOnline is not supported via API.
  4. When a visitor continues with the checkout process - if a significant amount of time has passed, call Is Available to confirm that the slot is still available before continuing.
  5. When a visitor completes the checkout process, call Book with Checkout. Include formInfo and either scheduleId or by bySessionId.

Book a member (e.g., someone known to the site owner, who has an existing membership to the Wix site) to a new session of an existing service

Create a new session and book a member into it (in the Wix Bookings UI, only an owner can use this functionality).

Call Book with Checkout with formInfo and createSession.

Book a member (i.e., someone known to the site owner, who has an existing membership to the Wix site) to a given service, who wants to pay using their Wix Pricing Plan

Same as above. During step 4, when calling Checkout Options, including the member's contact ID, to display the payment options available for this service. When available, their Wix Pricing Plan will be returned.

Was this helpful?
Yes
No