Search.../

confirmOrder( )

Confirms an order.

Description

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).

Admin Method

This function requires elevated permissions to run. This function is not universal and runs only on the backend.

Syntax

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

confirmOrder Parameters

NAME
TYPE
DESCRIPTION
eventId
string

Event ID to which the order belongs.

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