Search...
cancelReservation( )
Cancels ticket reservation and returns tickets to stock.
Syntax
function cancelReservation(_id: string, eventId: string): Promise<void>
cancelReservation Parameters
NAME
TYPE
DESCRIPTION
_id
string
Reservation ID.
eventId
string
Event ID to which the reservation belongs.
Returns
Return Type:
Promise<
void
>Was this helpful?
cancelReservation example
Copy Code
1import { orders } from 'wix-events.v2';23 async function cancelReservation(id, eventId) {4 try {5 const result = await orders.cancelReservation(id, eventId);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13