getOrder( )
Retrieves an order, including ticket data.
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
An object containing identifiers for the order to be retrieved.
An object representing the available options for getting an order.
Returns
Requested order.
Return Type:
NAME
TYPE
DESCRIPTION
Whether the order is anonymized by GDPR delete.
Whether the order is archived.
Checkout channel type
Checkout form response. When each purchased ticket is assigned to a guest, guest forms are returned for each ticket, and buyer info is returned.
Whether the order is confirmed (triggered once payment gateway processes the payment and funds reach the merchant's account).
Contact ID of buyer (resolved using email address).
RSVP created timestamp.
Guest email.
Event ID to which the order belongs.
Guest first name.
Guest full name.
Whether all tickets in order are checked-in.
Order invoice.
Guest last name.
Buyer member ID, if applicable.
Payment method used for purchase, e.g., "payPal", "creditCard", etc.
Unique order number.
Internal order payment details
Reservation ID.
Payment snapshot ID. Empty for the FREE
order.
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 toPAID
.INITIATED
: The order is awaiting for payment.CANCELED
: The order is canceled.DECLINED
: The order is payment is declined.
Tickets (generated after payment).
Ticket PDF URL.
Quantity of ordered tickets.
Total order price.
Order updated timestamp.
Was this helpful?
getOrder example
1import { orders } from 'wix-events.v2';23 async function getOrder(identifiers, options) {4 try {5 const result = await orders.getOrder(identifiers, options);67 return result;8 } catch (error) {9 console.error(error);10 // Handle the error11 }12 }13