Introduction

Use the Tickets API to create custom ticketing experiences for your events.

You need to have at least one existing event before getting started.

Typical Custom Ticketing Lifecycle

  1. In the Dashboard, create at least one ticket for an event.
  2. Retrieve the ID of an event from the Events/Events collection.
  3. Retrieve the IDs of event tickets from the Events/Tickets collection using the event ID retrieved above.
  4. Get the event Form using the getForm() function with the event ID retrieved above.
  5. Retrieve information about the registration form inputs in the form using the formData function.
  6. In the Editor, add user input elements for each form input retrieved above. You may want to set the elements IDs to match the names of form inputs retrieved above so that you will not have to map the names later.
  7. In the Editor, add elements to display the available tickets and add input elements for site visitors to select tickets.
  8. In the Editor, add a button that will be used to reserve ticket a site visitor selects.
  9. When the reserve button is clicked, gather the selected tickets and use the reserve() function to reserve the tickets. The function creates a reservation ID to be used later.
  10. In the Editor, add a button that will be used to checkout reserved tickets.
  11. When the checkout button is clicked, gather the values entered into the form in a FormValue array and use checkout() function to checkout the reservation. The function creates an order.
  12. Use the payment ID from the order created above to call the Wix Pay API's startPayment() function to complete the payment process.
  13. Display the link to the tickets as a PDF.
Did this help?