confirmOrder( )


Confirms an order.

This function changes order status from INITIATED, PENDING, OFFLINE_PENDING to PAID. Confirming orders with INITIATED or PENDING status triggers an email with the tickets to the buyer (and to additional guests, if provided).

Authentication

This function requires elevated permissions and runs only on the backend and on dashboard pages.

Permissions
Manage Events - all permissions
Manage Orders
Learn more about app permissions.
Method Declaration
Copy
function confirmOrder(
  eventId: string,
  options: ConfirmOrderOptions,
): Promise<ConfirmOrderResponse>;
Method Parameters
eventIdstringRequired

Event ID to which the order belongs.


optionsConfirmOrderOptions

An object representing the available options for confirming an order.

Returns
Return Type:Promise<ConfirmOrderResponse>
JavaScript
import { orders } from "wix-events.v2"; async function confirmOrder(eventId, options) { try { const result = await orders.confirmOrder(eventId, options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?