O endereço de e-mail gerado pela conta de serviço do Google Cloud.
aud
String
S
Público-alvo. O público-alvo dos objetos da API Google Wallet será sempre
google:
typ
String
S
Tipo de JWT. O público-alvo dos objetos da API Google Wallet será sempre
savetowallet:
iat
Número inteiro
S
Emitido em tempo hábil, em segundos, desde o período.
payload
Objeto
S
Objeto de payload.
payload.eventTicketClasses
Matriz
N
Classe de ingresso de evento a ser salva.
payload.eventTicketObjects
Matriz
N
Objeto de ingresso de evento a ser salvo.
payload.flightClasses
Matriz
N
Classe de voo a ser salva.
payload.flightObjects
Matriz
N
Objeto de voo a ser salvo.
payload.giftCardClasses
Matriz
N
Classe de vale-presente a ser salva.
payload.giftCardObjects
Matriz
N
Objeto de vale-presente a ser salvo.
payload.loyaltyClasses
Matriz
N
Classe de fidelidade a ser salva.
payload.loyaltyObjects
Matriz
N
Objeto de fidelidade a ser salvo.
payload.offerObjects
Matriz
N
Objeto de oferta a ser salvo.
payload.offerClasses
Matriz
N
Classe de oferta a ser salva.
payload.transitObjects
Matriz
N
Objeto de transporte a ser salvo.
payload.transitClasses
Matriz
N
Classe de transporte a ser salva.
origins
Matriz
S
Matriz de domínios aprovados para a funcionalidade de salvamento do JWT. API Google Wallet
O botão não será renderizado quando o campo origins não estiver definido. Você pode
pode receber uma mensagem de
"Carregamento negado por X-Frame-Options" ou "Exibição recusada" no
console do navegador quando o campo de origem não está definido.
[[["Fácil de entender","easyToUnderstand","thumb-up"],["Meu problema foi resolvido","solvedMyProblem","thumb-up"],["Outro","otherUp","thumb-up"]],[["Não contém as informações de que eu preciso","missingTheInformationINeed","thumb-down"],["Muito complicado / etapas demais","tooComplicatedTooManySteps","thumb-down"],["Desatualizado","outOfDate","thumb-down"],["Problema na tradução","translationIssue","thumb-down"],["Problema com as amostras / o código","samplesCodeIssue","thumb-down"],["Outro","otherDown","thumb-down"]],["Última atualização 2025-07-25 UTC."],[[["\u003cp\u003eThe JSON structure defines a payload for saving various Google Wallet objects like event tickets, flights, gift cards, loyalty cards, offers, and transit passes.\u003c/p\u003e\n"],["\u003cp\u003eRequired fields include \u003ccode\u003eiss\u003c/code\u003e (issuer), \u003ccode\u003eaud\u003c/code\u003e (audience), \u003ccode\u003etyp\u003c/code\u003e (type), \u003ccode\u003eiat\u003c/code\u003e (issued at time), \u003ccode\u003epayload\u003c/code\u003e (object data), and \u003ccode\u003eorigins\u003c/code\u003e (allowed domains).\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003epayload\u003c/code\u003e object contains arrays for different object types, each with 'Class' and 'Object' entries for defining object structures and instances.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eorigins\u003c/code\u003e field is crucial for enabling the Google Wallet API button and preventing loading errors in the browser.\u003c/p\u003e\n"]]],["The JSON defines data for saving various passes to Google Wallet. Required fields include the service account email (`iss`), \"google\" as the audience (`aud`), \"savetowallet\" as the type (`typ`), and the issued-at time (`iat`). The `payload` contains arrays for classes and objects related to event tickets, flights, gift cards, loyalty programs, offers, and transit. `origins` lists approved domains for JWT saving. Each object or class array within the `payload` is optional.\n"],null,["# Google Wallet API JWT\n\n### JSON representation\n\n```gdscript\n{\n \"iss\": \"example_service_account@developer.gserviceaccount.com\",\n \"aud\": \"google\",\n \"typ\": \"savetowallet\",\n \"iat\": 1368029586,\n \"payload\": {\n \"eventTicketClasses\": [{\n ... //Event ticket Class JSON\n }],\n \"eventTicketObjects\": [{\n // Event ticket Object JSON\n }],\n \"flightClasses\": [{\n // Flight Class JSON\n }],\n \"flightObjects\": [{\n // Flight Object JSON\n }],\n \"giftCardClasses\": [{\n // Gift card Class JSON\n }],\n \"giftCardObjects\": [{\n // Gift card Object JSON\n }],\n \"loyaltyClasses\": [{\n // Loyalty Class JSON\n }],\n \"loyaltyObjects\": [{\n // Loyalty Object JSON\n }],\n \"offerClasses\": [{\n // Offer Class JSON\n }],\n \"offerObjects\": [{\n // Offer Object JSON\n }],\n \"transitClasses\": [{\n // Transit Class JSON\n }],\n \"transitObjects\": [{\n // Transit Object JSON\n }]\n },\n \"origins\": [\"http://baconrista.com\", \"https://baconrista.com\"]\n}\n```\n\n### Fields\n\n| Field | Type | Required | Description |\n|------------------------------|---------|----------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `iss` | String | Y | Your Google Cloud service account generated email address. |\n| `aud` | String | Y | Audience. The audience for Google Wallet API Objects will always be `google`. |\n| `typ` | String | Y | Type of JWT. The audience for Google Wallet API Objects will always be `savetowallet`. |\n| `iat` | Integer | Y | Issued at time in seconds since epoch. |\n| `payload` | Object | Y | Payload object. |\n| `payload.eventTicketClasses` | Array | N | Event Ticket Class to save. |\n| `payload.eventTicketObjects` | Array | N | Event Ticket Object to save. |\n| `payload.flightClasses` | Array | N | Flight Class to save. |\n| `payload.flightObjects` | Array | N | Flight Object to save. |\n| `payload.giftCardClasses` | Array | N | Gift Card Class to save. |\n| `payload.giftCardObjects` | Array | N | Gift Card Object to save. |\n| `payload.loyaltyClasses` | Array | N | Loyalty Class to save. |\n| `payload.loyaltyObjects` | Array | N | Loyalty Object to save. |\n| `payload.offerObjects` | Array | N | Offer Object to save. |\n| `payload.offerClasses` | Array | N | Offer Class to save. |\n| `payload.transitObjects` | Array | N | Transit Object to save. |\n| `payload.transitClasses` | Array | N | Transit Class to save. |\n| `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. |"]]