Introduction

Use the Tickets API to create custom ticketing experiences for a site's events.

A site needs to have at least 1 existing event before getting started.

Typical Custom Ticketing Lifecycle

  1. In the dashboard, create at least 1 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 calling getForm() (SDK | Velo) with the event ID retrieved above.
  5. Retrieve information about the registration form inputs in the form using formData() (SDK | Velo).
  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 won't 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 the ticket that a site visitor selects.
  9. When the reserve button is clicked, gather the selected tickets and use reserve() to reserve the tickets. This 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() to checkout the reservation. This creates an order.
  12. Use the payment ID from the order created above to call the Pay API's startPayment() to complete the payment process.
  13. Display the link to the tickets as a PDF.
Did this help?