Use cases

This guide outlines the following specific ways that you can use the Google Pay API for Passes to engage with your customers for the event ticket vertical:

Make a button to save multiple passes

If a user buys multiple passes, and they're likely to save all of them to Google Pay, then it's useful to allow a user to save many objects with one click of a Save to Google Pay button or link. Multiple objects or classes can be defined in the JSON Web Token (JWT) to be signed.

The JWT must be made in either of the following formats:

  • Only pre-inserted classes and objects are used.
  • Only object and class resources that are fully defined within the JWT are used.

For an example of how to create a button for multiple passes, see Save multiple attendees button. For more information on the UI representation of Passes, see Group event tickets.

Group event tickets

If there are EventTicketObject objects that satisfy certain conditions, the Google Pay app identifies them as a group. This can be done with or without the class.eventID property.

There are features which work differently if they're used on a group rather than individual objects, such as status notifications, or the organization of multiple Passes saved for many attendees on the user interface.

Group with class.eventId

The class.eventId property can group tickets, regardless of other properties. For example, if two EventTicketObject objects have class.eventId = "foo", even if they have different class.eventName and class.dateTime.start, both objects are considered to be in a group.

When class.eventID is used, objects only require the following properties to be consistent in order to be considered as a group.

  • Issuer ID (from Google Pay API for Passes Merchant Center)
  • class.eventId

Group without class.eventId

If class.eventId isn't set for EventTicketObject objects, they're only considered a group if all of the properties listed below are the same:

  • Issuer ID (from Google Pay API for Passes Merchant Center)
  • class.eventName
  • class.dateTime.start

Upcoming event notification

Google Pay sends a notification to the user three hours prior to the event. The start time is established by class.dateTime.start.

To receive this notification, the user must enable notifications. To do so, they need to navigate to Settings > Notifications and turn on Updates about your passes.

The notification shows up in two places, the lock screen and the notifications area.

Lock screen

If the user has notifications enabled for the lock screen, they receive the status notification in the following unmodifiable format:
Your upcoming event
Expand for more options

If they tap the notification and unlock their device, their pass appears in the Google Pay app.

If the user has multiple passes, only the soonest useable pass is shown. If they've saved many event ticket passes as per Group event tickets, the notification only shows one of the passes in the group. However, when they tap it, the user can swipe left and right to see the other grouped passes.

Notifications area

The notification shows the barcode and other options. The user can tap it to view the pass in the Google Pay app.

A status notification won't auto-dismiss after a user opens it. Auto-dismiss occurs 60 minutes after the end time for their event. If no class.dateTime.end time is provided, class.dateTime.start is used.

Handle expired passes

Under the "Passes" tab of the Google Pay app, there's an "Expired passes" section that contains all archived or inactive passes. A event ticket is moved to the "Expired passes" section if at least one of the following conditions is true:

  • The object.validTimeInterval.end.date of the event ticket has passed. The pass may move to "Expired passes" anytime up to 24 hours after object.validTimeInterval.end.date.
  • At least 72 hours have passed since the class.dateTime.end of the event ticket. If class.dateTime.end is not specified, class.dateTime.start is used instead.
  • The state field of EventTicketObject is marked as Expired, Inactive, or Completed.

Envoyer des commentaires concernant…

Google Pay for Passes