JSON representation
{ "iss": "example_service_account@developer.gserviceaccount.com", "aud": "google", "typ": "savetowallet", "iat": 1368029586, "payload": { "eventTicketClasses": [{ ... //Event ticket Class JSON }], "eventTicketObjects": [{ // Event ticket Object JSON }], "flightClasses": [{ // Flight Class JSON }], "flightObjects": [{ // Flight Object JSON }], "giftCardClasses": [{ // Gift card Class JSON }], "giftCardObjects": [{ // Gift card Object JSON }], "loyaltyClasses": [{ // Loyalty Class JSON }], "loyaltyObjects": [{ // Loyalty Object JSON }], "offerClasses": [{ // Offer Class JSON }], "offerObjects": [{ // Offer Object JSON }], "transitClasses": [{ // Transit Class JSON }], "transitObjects": [{ // Transit Object JSON }] }, "origins": ["http://baconrista.com", "https://baconrista.com"] }
Fields
Field | Type | Required | Description |
---|---|---|---|
iss |
String | Y | Your Google Cloud service account generated email address. |
aud |
String | Y | Audience. The audience for Google Wallet API Objects will always be
google . |
typ |
String | Y | Type of JWT. The audience for Google Wallet API Objects will always be
savetowallet . |
iat |
Integer | Y | Issued at time in seconds since epoch. |
payload |
Object | Y | Payload object. |
payload.eventTicketClasses |
Array | N | Event Ticket Class to save. |
payload.eventTicketObjects |
Array | N | Event Ticket Object to save. |
payload.flightClasses |
Array | N | Flight Class to save. |
payload.flightObjects |
Array | N | Flight Object to save. |
payload.giftCardClasses |
Array | N | Gift Card Class to save. |
payload.giftCardObjects |
Array | N | Gift Card Object to save. |
payload.loyaltyClasses |
Array | N | Loyalty Class to save. |
payload.loyaltyObjects |
Array | N | Loyalty Object to save. |
payload.offerObjects |
Array | N | Offer Object to save. |
payload.offerClasses |
Array | N | Offer Class to save. |
payload.transitObjects |
Array | N | Transit Object to save. |
payload.transitClasses |
Array | N | Transit Class to save. |
origins |
Array | Y | Array of domains to approve for JWT saving functionality. The Google Wallet API
button will not render when the origins field is not defined. You could
potentially get a "Load denied by X-Frame-Options" or "Refused to display" messages in the
browser console when the origins field is not defined. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-23 UTC.
[null,null,["Last updated 2024-10-23 UTC."],[[["The JSON structure defines a payload for saving various Google Wallet objects like event tickets, flights, gift cards, loyalty cards, offers, and transit passes."],["Required fields include `iss` (issuer), `aud` (audience), `typ` (type), `iat` (issued at time), `payload` (object data), and `origins` (allowed domains)."],["The `payload` object contains arrays for different object types, each with 'Class' and 'Object' entries for defining object structures and instances."],["The `origins` field is crucial for enabling the Google Wallet API button and preventing loading errors in the browser."]]],[]]