With the Wix Bookings Pricing API, you can preview and calculate the price of a booking.
previewPrice()
lets you retrieve information about how much a customer would have to pay for a booking's line items before the actual booking has been created.calculatePrice()
determines the base price of a booking.The price of the booking can be fixed, free, or varied. With varied pricing, site owners can offer different prices for the same service based on their customers' choices.
For a comprehensive glossary of Wix Bookings terms, see Terminology.
It’s important to note the following points before starting to code:
You can only preview the price for line items belonging to the same service.
If using the
Wix Bookings Pricing Integration service plugin to set up your own custom logic for varied pricing, then previewPrice()
is not supported and an error is issued.