Search.../

getOrder( )

Retrieves an order, including ticket data.

Admin Method

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

Syntax

function getOrder(identifiers: GetOrderIdentifiers, options: GetOrderOptions): Promise<Order>

getOrder Parameters

NAME
TYPE
DESCRIPTION
identifiers
GetOrderIdentifiers

An object containing identifiers for the order to be retrieved.

options
Optional
GetOrderOptions

An object representing the available options for getting an order.

Returns

Requested order.

Return Type:

Promise<
Order
>
NAME
TYPE
DESCRIPTION
anonymized
boolean

Whether the order is anonymized by GDPR delete.

archived
boolean

Whether the order is archived.

channel
string

Checkout channel type

checkoutForm
FormResponse

Checkout form response. When each purchased ticket is assigned to a guest, guest forms are returned for each ticket, and buyer info is returned.

confirmed
boolean

Whether the order is confirmed (triggered once payment gateway processes the payment and funds reach the merchant's account).

contactId
string

Contact ID of buyer (resolved using email address).

created
Date

RSVP created timestamp.

email
string

Guest email.

eventId
string

Event ID to which the order belongs.

firstName
string

Guest first name.

fullName
string

Guest full name.

fullyCheckedIn
boolean

Whether all tickets in order are checked-in.

invoice
Invoice

Order invoice.

lastName
string

Guest last name.

memberId
string

Buyer member ID, if applicable.

method
string

Payment method used for purchase, e.g., "payPal", "creditCard", etc.

orderNumber
string

Unique order number.

paymentDetails
PaymentDetails

Internal order payment details

reservationId
string

Reservation ID.

snapshotId
string

Payment snapshot ID. Empty for the FREE order.

status
string

Order status. Possible values:

  • FREE: The order is confirmed, no payment is required.
  • PENDING: The order was paid, but the payment gateway suspended the payment.
  • PAID: The order is paid.
  • OFFLINE_PENDING: The order is confirmed but has to be paid in cash and the status is manually updated to PAID.
  • INITIATED: The order is awaiting for payment.
  • CANCELED: The order is canceled.
  • DECLINED: The order is payment is declined.
tickets
Array<
TicketingTicket
>

Tickets (generated after payment).

ticketsPdf
string

Ticket PDF URL.

ticketsQuantity
number

Quantity of ordered tickets.

totalPrice
Money

Total order price.

updated
Date

Order updated timestamp.

Was this helpful?

getOrder example

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