Tickitto Docs

Post Messages

All of the post messages sent by the Widget will be an object with two entries:

  • A message Type
  • messageData

For example:

{
type: "NEW_HEIGHT",
messageData: {height: 350}
}

Message Types

INITIALIZED

This message indicates that the Widget has loaded fully. It is a useful indicator to know when the right time is to display the Widget to the ticket buyer.


BOOKING_ERROR

This message indicates that an error has occurred while trying to book and add a ticket to the associated basket_id.


NEW_TICKET_SELECTED

This message indicates that the ticket buyer has successfully selected the ticket, and this has been added to the associated basket_id.

The messageData would contain all the date, time, seat, and other selection options made by the ticket buyer for that event. Therefore as a developer, you do not need to populate the ticket buyer's selection on the widget.

This is the point at which you no longer need to display the widget.


SESSION_EXPIRED

Each session_id has a specific Time to live to ensure that the availability instances and available seats loaded in the widget are up to date. This message indicates that the ticket buyer has taken time to select the tickets for the event that is longer than the session's ttl.

In this instance, the Widget will load a specific UI informing the user to refresh the session in order to update the availability instances.


NEW_HEIGHT

This message indicates that the height of the platform has changed. Therefore as a developer, you will need to change the height of the Tickitto widget to optimize the experience for the ticket buyer. Please refer to the Handling iFrame Sizes section in this documentation.