Order expiry

Both the Digital Platform and downstream Vista services running at cinema locations have a concept of order expiry. This concept defines a point whereby an order, if not completed, is considered abandoned and will be cleaned up automatically. The clean-up process can occur at both the Digital Platform and/or cinema and will essentially cancel the order.

The expiry/clean-up results in the same actions as if the client had explicitly canceled the order:

  • Any seats reserved as part of the in-progress order are released.
  • Any third-party member tickets added to the order are released.
  • The in-progress order data is removed from the system.

Expiry configuration

The expiry timeout value configuration is available both in the Digital Platform API and at cinema. These values should be configured to be compatible - ideally the Digital Platform API value should be at the same time or earlier than the cinema. An order expiry grace period can also be configured which allows an order to be considered not expired for a period of time even after it has passed its expiry time limit.

Expiry value

All endpoints that return an order will include the expiresAt value indicating when the order will be automatically canceled.

Copy
Copied
{
  "order": {
    "id": "48ac589507ac48ae9ed64eeadbe0ab6d",
    "type": "Standard",
    "status": "InProgress",
    "expiresAt": "2024-01-30T02:46:16.7543072+00:00",
    "siteId": "0000000003"
  }
}

Client expectations

Client applications should indicate to the patron when their order will expire, either by using the expiresAt to render a live timer, or through a general message indicating how long they have to complete their order. The client should also have logic to handle the expiry event.

Required client behaviour:

  • Upon expiry, send the patron to a session expired page informing them that their order has expired and they must create a new order.

Recommended client behaviour:

  • Upon expiry, explicitly cancel the order via the CancelOrder endpoint and redirect the patron to an appropriate 'order expired' page. This will ensure seats are released immediately rather than waiting for background processes which may take a few minutes.
  • Before making the cancel request, the client should fetch the order one last time to ensure its expiry hasn't been extended by a separate tab or window.

Optional client behaviour:

  • When close to expiry, present the the patron with the option to manually extend the order expiry (see below).

Manually extending order expiry

The order expiry can be manually extended via the ResetOrderExpiry endpoint. This action will reset the order's expiry back to its maximum value.

Automatically extending order expiry

In-progress orders will automatically have their order expiry extended by any endpoint that modifies an order, e.g.:

The expiry is extended by a longer duration upon payment creation to allow the patron to complete payment.