Generates a preview of an invoice, including the given coupon or pricing plan.
function getInvoice(
reservationId: string,
eventId: string,
options: GetInvoiceOptions,
): Promise<GetInvoiceResponse>;
Reservation ID.
Event ID to which the invoice belongs.
An object representing the available options for generating a preview of a reservation invoice.
import { orders } from "wix-events.v2";
async function getInvoice(reservationId, eventId, options) {
try {
const result = await orders.getInvoice(reservationId, eventId, options);
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.