Search.../

confirmOrder( )

Developer Preview

Changes order status from "INITIATED, "PENDING", or "OFFLINE_PENDING" to "PAID". Previously confirmed orders (with status "PAID" or "FREE") are not changed. Confirming previously "INITIATED" or "PENDING" orders triggers an email with the tickets to the buyer (and to additional guests, if relevant and provided).

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

Syntax

function confirmOrder(eventId: string, options: ConfirmOrderOptions): Promise<ConfirmOrderResponse>

confirmOrder Parameters

NAME
TYPE
DESCRIPTION
eventId
string

Event ID.

options
Optional
ConfirmOrderOptions

An object representing the available options for confirming an order.

Returns

Return Type:

Promise<
ConfirmOrderResponse
>
NAME
TYPE
DESCRIPTION
orders
Array<
Order
>

Confirmed orders.

Was this helpful?

confirmOrder example

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