Search.../

Introduction

The Custom Pricing 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 SPI 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:

To add a custom extension

  1. Add the extension to your site.
  2. Update the getConfig() function in the -config.js file that is added to your site during step 1.
  3. Update the calculatePrice() function in the .js file that is added to your site during step 1.

Was this helpful?