About the Wix Bookings Pricing API
APIs in Developer Preview are subject to change and are not intended for use in production.
Send us your suggestions for improving this API. Your feedback is valuable to us.
Note: This module is universal. Functions in this module can run on both the backend and frontend, unless specified otherwise.
With the Wix Bookings Pricing API, you can preview and calculate the price of a booking.
- The
previewPrice()
function 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. - The
calculatePrice()
function 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.
- Site owners can set up basic varied pricing options in the site's dashboard.
- You can use the Wix Bookings Service Options and Variants APIs to set up more robust pricing options.
Terminology
For a comprehensive glossary of Wix Bookings terms, see Terminology.
Before You Begin
You can only preview the price for line items belonging to the same service.
If using the Wix Bookings Pricing Provider REST SPI to set up your own custom logic for varied pricing, the previewPrice() function is not supported and an error is issued.
To use the Bookings Pricing API, import
{ pricing }
from thewix-bookings.v2
module in your Velo code:
javascript | Copy Codeimport { pricing } from 'wix-bookings.v2';
Was this helpful?