Introduction

With the Orders API you can manage and track ticket orders, create/cancel tickets reservations, and check out the reserved tickets.

To get yourself comfortable with creating ticket reservation and checkout flows, you can check out these Velo example sites:

Even though these examples are for the wix-events-frontend module, they still can be a great start to practice the flows.

With the Orders API you can:

  • Get a list of all orders.
  • Update an order or change its status.
  • Get a summary of total ticket sales.
  • Create and cancel ticket reservation.
  • Checkout tickets.
  • Get an invoice.

Terminology

  • Order: Process by which a customer or attendee purchases one or more tickets for an event or activity. It involves the selection of desired tickets, providing necessary information such as payment details and contact information, and completing the transaction to secure the tickets.
  • Event: A gathering organized by an individual or business for a group of people.
Was this helpful?
Yes
No

Setup

To use the Orders API, install the @wix/events package using npm or Yarn:

Copy
1
npm install @wix/events

or

Copy
1
yarn add @wix/events

Then import { orders } from @wix/events:

Copy
1
import { orders } from '@wix/events'
Was this helpful?
Yes
No

bulkUpdateOrders( )

Archives multiple orders.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function bulkUpdateOrders(eventId: string, options: BulkUpdateOrdersOptions): Promise<BulkUpdateOrdersResponse>
Method Parameters
eventIdstringRequired
Event ID to which the order belongs.

optionsBulkUpdateOrdersOptions
An object representing the available options for confirming an order.
Returns
Return Type:Promise<BulkUpdateOrdersResponse>
Was this helpful?
Yes
No

checkout( )

Checkouts the reserved tickets.

Creates an order and associates it with a site visitor contact. Guest details are received from the Registration Form input fields.

There is a possibility to use a separate ready-made Wix checkout form where the user will be redirected from your non-Wix site or a custom ticket picker created with Velo. To build the checkout form path, get your event base URL by using the getEvent() function and add the following path: /{{EVENT_PAGE_SLUG}}/{{SLUG}}/ticket-form?reservationId={{YOUR_RESERVATION_ID}}

Example: https://johndoe.wixsite.com/weddings/event-details/doe-wedding/ticket-form?reservationId=2be6d34a-2a1e-459f-897b-b4a66e73f69a

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function checkout(eventId: string, options: CheckoutOptionsForRequest): Promise<CheckoutResponse>
Method Parameters
eventIdstringRequired
Event ID to which the checkout belongs.

optionsCheckoutOptionsForRequest
An object representing the available options for checking out a reserved ticket.
Returns
Return Type:Promise<CheckoutResponse>
Was this helpful?
Yes
No

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

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
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>
Was this helpful?
Yes
No

createReservation( )

Reserves tickets for 20 minutes.

Reserved tickets are deducted from ticket stock and cannot be bought by another site visitor. When the reservation expires, the tickets are added back to the stock.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function createReservation(eventId: string, options: CreateReservationOptions): Promise<CreateReservationResponse>
Method Parameters
eventIdstringRequired
Event ID to which the reservation belongs.

optionsCreateReservationOptions
An object representing the available options for creating a reservation.
Returns
Return Type:Promise<CreateReservationResponse>
Was this helpful?
Yes
No

getCheckoutOptions( )

Retrieves checkout details.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function getCheckoutOptions(): Promise<GetCheckoutOptionsResponse>
Request
This method does not take any parameters
Returns
Return Type:Promise<GetCheckoutOptionsResponse>
Was this helpful?
Yes
No

getInvoice( )

Generates a preview of an invoice, including the given coupon or pricing plan.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Events - all read permissions
Manage Events - all permissions
Read Basic Events Order Info
Manage Orders
Learn more about permission scopes.
Copy
function getInvoice(reservationId: string, eventId: string, options: GetInvoiceOptions): Promise<GetInvoiceResponse>
Method Parameters
reservationIdstringRequired
Reservation ID.

eventIdstringRequired
Event ID to which the invoice belongs.

optionsGetInvoiceOptions
An object representing the available options for generating a preview of a reservation invoice.
Returns
Return Type:Promise<GetInvoiceResponse>
Was this helpful?
Yes
No

getOrder( )

Retrieves an order, including ticket data.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Events - all read permissions
Manage Events - all permissions
Read Basic Events Order Info
Manage Orders
Learn more about permission scopes.
Copy
function getOrder(identifiers: GetOrderIdentifiers, options: GetOrderOptions): Promise<Order>
Method Parameters
identifiersGetOrderIdentifiersRequired
An object containing identifiers for the order to be retrieved.

optionsGetOrderOptions
An object representing the available options for getting an order.
Returns
Return Type:Promise<Order>
Was this helpful?
Yes
No

getSummary( )

Retrieves a summary of total ticket sales.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Events - all read permissions
Manage Events - all permissions
Read Basic Events Order Info
Manage Orders
Learn more about permission scopes.
Copy
function getSummary(options: GetSummaryOptions): Promise<GetSummaryResponse>
Method Parameters
optionsGetSummaryOptions
An object representing the available options for retrieving a summary of total ticket sales.
Returns
Return Type:Promise<GetSummaryResponse>
Was this helpful?
Yes
No

listAvailableTickets( )

Returns tickets available to reserve.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function listAvailableTickets(options: ListAvailableTicketsOptions): Promise<ListAvailableTicketsResponse>
Method Parameters
optionsListAvailableTicketsOptions
An object representing the available options for retrieving a list of tickets available for reservation.
Returns
Return Type:Promise<ListAvailableTicketsResponse>
Was this helpful?
Yes
No

listOrders( )

Retrieves a list of orders, including ticket data.

Permission Scopes

For app development, you must have one of the following permission scopes:
Read Events - all read permissions
Manage Events - all permissions
Read Basic Events Order Info
Manage Orders
Learn more about permission scopes.
Copy
function listOrders(options: ListOrdersOptions): Promise<ListOrdersResponse>
Method Parameters
optionsListOrdersOptions
An object representing the available options for retrieving a list of orders.
Returns
Return Type:Promise<ListOrdersResponse>
Was this helpful?
Yes
No

queryAvailableTickets( )

Returns tickets available to reserve.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function queryAvailableTickets(options: QueryAvailableTicketsOptions): Promise<QueryAvailableTicketsResponse>
Method Parameters
optionsQueryAvailableTicketsOptions
An object representing the available options for retrieving a list of tickets available for reservation.
Returns
Return Type:Promise<QueryAvailableTicketsResponse>
Was this helpful?
Yes
No

updateOrder( )

Updates an order.

Permission Scopes

For app development, you must have one of the following permission scopes:
Manage Events - all permissions
Manage Orders
Learn more about permission scopes.
Copy
function updateOrder(identifiers: UpdateOrderIdentifiers, options: UpdateOrderOptions): Promise<UpdateOrderResponse>
Method Parameters
identifiersUpdateOrderIdentifiersRequired
An object containing identifiers for the order to be updated.

optionsUpdateOrderOptions
An object representing the available options for updating an order.
Returns
Return Type:Promise<UpdateOrderResponse>
Was this helpful?
Yes
No