This API is subject to change. Bug fixes and new features will be released based on developer feedback throughout the preview period.
Calculates the base price of a booking.
You can call calculatePrice()
after a booking is created. The returned calculated price includes information about each line
item's price and the booking's total price.
You can use previewPrice()
to get the base price
before a booking is created.
The calculated price is the base price that will be used as a basis for charging the customer. During checkout, additional taxes and fees might be added to this base price.
Wix Bookings has its own default pricing logic for calculating the price. When
using Wix Bookings' default pricing logic, you must pass the serviceId
in the slot
or schedule
object to calculatePrice()
.
Alternatively you can customize the pricing logic using the
Bookings Pricing Integration REST SPI.
If you integrate with a pricing provider, the customized pricing logic becomes
the default logic. This means that, if the Pricing Integration SPI is implemented,
when calling calculatePrice()
,
the customized logic is used instead.
Booking to calculate the price for.