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

Permissions
Manage Events - all permissions
Manage Orders
Learn more about app permissions.
Method Declaration
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>
JavaScript
import { orders } from "wix-events.v2"; async function checkout(eventId, options) { try { const result = await orders.checkout(eventId, options); return result; } catch (error) { console.error(error); // Handle the error } }
Errors

This method doesn’t return any custom errors, but may return standard errors. Learn more about standard Wix errors.

Did this help?