declineBooking( )


Updates the booking status to DECLINED and updates the relevant session's participants.approvalStatus to DECLINED without checking whether the relevant slot or schedule is still available.

eCommerce checkout restriction

Call this method only when using a custom checkout page. Don't call it when using a Wix eCommerce checkout (SDK | REST). In such cases, Wix automatically updates the booking status based on the paymentStatus of the corresponding Wix eCommerce order (SDK | REST).

When to call Confirm Or Decline Booking instead

The method doesn't check whether a slot or schedule is still available. For these checks you can call Confirm or Decline Booking (SDK | REST).

Original status validation

You can only decline bookings with a status of PENDING, CREATED, or WAITING_LIST.

Payment status

Also updates the booking's paymentStatus, if you specify a new payment status.

Notify customers

You can specify a participantNotification.message for the customer. To send the message, you must also specify participantNotification.notifyParticipants as true.

Authentication
  • When developing websites or building an app with Blocks, this method may require elevated permissions, depending on the identity of the user calling it and the calling user’s permissions.
  • When building apps without Blocks or for headless projects, you can only call this method directly when authenticated as a Wix app or Wix user identity. When authenticated as a different identity, you can call this method using elevation.
  • Elevation permits users to call methods they typically cannot access. Therefore, you should only use it intentionally and securely.
Permissions
Manage Bookings - all permissions
Manage Bookings
Learn more about app permissions.
Method Declaration
Copy
Method Parameters
bookingIdstringRequired

ID of the booking to decline.


revisionstringRequired

Revision number, which increments by 1 each time the booking is updated.

To prevent conflicting changes, the current revision must be specified when declining the booking.


optionsDeclineBookingOptions

An object representing the available options for declining a booking.

Returns
Return Type:Promise<DeclineBookingResponse>
JavaScript
Errors
404Not Found

There is 1 error with this status code.

428Failed Precondition

There are 2 errors with this status code.

This method may also return standard errors. Learn more about standard Wix errors.

Did this help?