This article shares some possible use cases your app could support, as well as a sample flow that could support each use case. This can be a helpful jumping off point as you plan your app's implementation.
Your app could collect a cancellation fee from the customer when the business cancels a booking in their dashboard on behalf of the customer. Note that Wix Bookings automatically applies the cancellation fee to an eCommerce order if the customer cancels the booking themselves.
To collect a cancellation fee:
initiatedBy
is set to a wixUserId
. Don't apply cancellation fees
for bookings that were canceled by customers themselves, since Wix Bookings
does that automatically.Your app could display a dashboard to the business owners that allows them to manage cancellation fees for their bookings.
To create a cancellation fee dashboard:
query.filter
. This retrieves all
upcoming bookings. If you want to display only bookings for a specific list
of services, also provide the relevant service IDs in the filter. Save the
list of retrieved booking IDs.PREVIEW
since the customer hasn't
canceled the associated booking.priceOverride
object with the amount stored on your servers.Your app could display information about the fee customers would have to be before they cancel their booking.
To display cancellation fee details:
withBookingPolicySettings
to true
and provide a time range as query.filter
.
This retrieves all bookings in the given range including their booking policies.allowedActions. cancel
field is set to true
.cancellationFeePolicy.enabled
is set to true
. Then, call
List Booking Fees By Booking Ids and pass the relevant bookingId
. Note that the returned cancellation fee has {"status": "PREVIEW"}
, which means that the customer hasn't agreed to pay it yet.