Search.../

cancelReservation( )

Developer Preview

Cancels ticket reservation and returns tickets to stock.

Description

Note: This function is restricted and only runs if you elevate permissions using the wix-auth.elevate() function.

Syntax

function cancelReservation(identifiers: CancelReservationIdentifiers): Promise<void>

cancelReservation Parameters

NAME
TYPE
DESCRIPTION
identifiers
CancelReservationIdentifiers

An object containing identifiers for the reservation to be cancelled.

Returns

Return Type:

Promise<
void
>

Was this helpful?

cancelReservation example

Copy Code
1import { checkout } from 'wix-events.v2';
2
3 async function cancelReservation(identifiers) {
4 try {
5 const result = await checkout.cancelReservation(identifiers);
6
7 return result;
8 } catch (error) {
9 console.error(error);
10 // Handle the error
11 }
12 }
13