Địa chỉ email do tài khoản dịch vụ Google Cloud của bạn tạo.
aud
Chuỗi
Có
Đối tượng. Đối tượng của Đối tượng API Google Wallet sẽ luôn là
google.
typ
Chuỗi
Có
Loại JWT. Đối tượng của Đối tượng API Google Wallet sẽ luôn là
savetowallet.
iat
Số nguyên
Có
Được phát hành tại thời điểm tính bằng giây kể từ thời gian bắt đầu của hệ thống.
payload
Đối tượng
Có
Đối tượng tải trọng.
payload.eventTicketClasses
Mảng
Không
Loại vé xem sự kiện để tiết kiệm.
payload.eventTicketObjects
Mảng
Không
Đối tượng vé xem sự kiện để lưu.
payload.flightClasses
Mảng
Không
Hạng chuyến bay để lưu.
payload.flightObjects
Mảng
Không
Đối tượng chuyến bay để lưu.
payload.giftCardClasses
Mảng
Không
Tiết kiệm đối với hạng thẻ quà tặng.
payload.giftCardObjects
Mảng
Không
Đối tượng thẻ quà tặng để lưu.
payload.loyaltyClasses
Mảng
Không
Bạn có thể tiết kiệm ưu đãi bằng cấp bậc chương trình khách hàng thân thiết.
payload.loyaltyObjects
Mảng
Không
Đối tượng khách hàng thân thiết để lưu.
payload.offerObjects
Mảng
Không
Cung cấp đối tượng để lưu.
payload.offerClasses
Mảng
Không
Bạn có thể tiết kiệm ưu đãi khi đăng ký Lớp học.
payload.transitObjects
Mảng
Không
Đối tượng phương tiện công cộng để lưu.
payload.transitClasses
Mảng
Không
Lớp phương tiện công cộng để lưu.
origins
Mảng
Có
Mảng miền cần phê duyệt chức năng lưu JWT. API Google Wallet
nút sẽ không hiển thị khi trường origins không được xác định. Bạn có thể
có thể nhận được thông báo "Tải bị từ chối bởi X-Frame-Options" hoặc "Từ chối hiển thị" thông báo trong phần
bảng điều khiển của trình duyệt khi trường nguồn gốc không được xác định.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 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. |"]]