Cancels ticket reservation and returns tickets to stock.
function cancelReservation(_id: string, eventId: string): Promise<void>;
Reservation ID.
Event ID to which the reservation belongs.
import { orders } from "wix-events.v2";
async function cancelReservation(id, eventId) {
try {
const result = await orders.cancelReservation(id, eventId);
return result;
} catch (error) {
console.error(error);
// Handle the error
}
}
This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.