Objects and linking

The Google Pay API for Passes uses the concept of an Object to represent loyalty cards, gift cards, offers, event tickets, boarding passes for flights, and transit passes. For example, each loyalty card a user has in their Google Pay app is represented by one LoyaltyObject.

When a user saves loyalty cards, gift cards, offers, event tickets, boarding passes for flights, and transit passes using the Save to Google Pay button, the API inserts an Object and then establishes a link between the object and the user. This means if the user clicks the button again, a new Object isn't inserted. A link already exists, so the Object isn't re-linked.

If a user removes their Pass from the Google Pay app, the Object they were linked to isn't removed. Instead, it's de-linked. If they were to click the Save to Google Pay button again, it would re-establish the link rather than creating a new Object.

While developing your Pass, a new Object id should be used between saves since the API doesn't re-insert an Object that matches an existing id.

Remember, removing a Pass from your account doesn't actually remove the Object. The Object is only de-linked from your account.

Envoyer des commentaires concernant…

Google Pay for Passes