The Custom Pricing service plugin (formerly SPI) is a service provider interface that allows site owners and collaborators to add custom pricing to bookings on their site. The custom pricing is calculated and used as the basis for the price when checking out the booking, overriding the standard Bookings pricing logic. Examples of custom pricing include surcharges for weekend rates or use of special equipment.
Wix Bookings calls the calculatePrice()
Velo service plugin function to retrieve the relevant data for a site collaborator to customize the price.
Site collaborators can then implement their own logic to calculate and return the price.
Note that the currency
used by calculatePrice()
is your site's currency. You can find the currency of your site using the getPaymentCurrency()
function.
Learn more:
getConfig()
function in the -config.js file that is added to your site during step 1.calculatePrice()
function in the .js file that is added to your site during step 1.