Sử dụng bộ sưu tập để sắp xếp ngăn nắp các trang
Lưu và phân loại nội dung dựa trên lựa chọn ưu tiên của bạn.
Thông tin khái quát
Tính năng Thẻ và vé được liên kết tự động cho phép bạn gửi thêm thẻ và vé cho một người dùng đã có thẻ và vé hiện có của bạn trong Google Wallet. Bạn cũng có thể liên kết trước thẻ và vé vào cổng với thẻ và vé chính khi người dùng lưu thẻ và vé chính (chính). Thẻ và vé được liên kết tự động được nhóm với thẻ và vé chính, trong đó có chú thích phía trên thẻ và vé chính để thông báo cho người dùng rằng thẻ và vé mới đã được liên kết. Các loại thẻ và vé sau đây được hỗ trợ làm thẻ và vé chính hoặc được liên kết;
Vé sự kiện
Thẻ lên máy bay
Thẻ đi phương tiện công cộng
Lời đề nghị
Thẻ quà tặng
Thẻ khách hàng thân thiết
Thẻ và vé chung
Thẻ/vé chính kèm theo chú thích cho biết một thẻ/vé mới đã được thêm
Thẻ và vé mới được liên kết với thẻ và vé chính
Trường hợp sử dụng
Có thể bạn có nhiều trường hợp sử dụng để liên kết thẻ và vé với một thẻ và vé hiện có. Sau đây là một số ví dụ:
Liên kết ưu đãi với thẻ khách hàng thân thiết hiện có.
Liên kết phiếu ăn với thẻ lên máy bay hoặc vé xem sự kiện.
Liên kết vé đỗ xe với vé xem sự kiện.
Một số điều cần cân nhắc khi sử dụng Thẻ và vé được liên kết tự động
Đối tượng chính và đối tượng được liên kết phải sử dụng cùng một mã phát hành.
Mỗi đối tượng chính chỉ được có tối đa 50 đối tượng liên kết.
Việc tự động đẩy thẻ và vé được liên kết không được đảm bảo và được coi là nỗ lực tốt nhất. Người dùng có thể chọn không nhận Thẻ và vé được liên kết tự động. Nếu trường hợp sử dụng là quan trọng và người dùng phải nhận được thẻ và vé đã liên kết, bạn nên giao tiếp thông qua một kênh khác để đảm bảo người dùng thêm thẻ và vé đó.
Sau khi nhận được phản hồi thành công, các thiết bị có thẻ và vé mà bạn đã cập nhật sẽ nhận được thẻ và vé được liên kết. Thẻ và vé được liên kết này sẽ được nhóm cùng với thẻ và vé chính. Người dùng có thể xem thẻ và vé đã liên kết bằng cách vuốt sang phải.
Xử lý ngoại lệ
Có thể xảy ra lỗi khi sử dụng API không đúng cách, bao gồm:
Tin nhắn
Lý do
Đối tượng chính và đối tượng được liên kết không có cùng mã nhà phát hành.
Bạn không thể đính kèm đối tượng được liên kết vào đối tượng của một tổ chức phát hành khác.
Đối tượng chính và đối tượng được liên kết tham chiếu đến cùng một đối tượng.
Bạn không thể đính kèm cùng một đối tượng với linkedObject.
Đối tượng được liên kết không tồn tại.
Đối tượng được liên kết phải được chèn vào API Wallet.
Đối tượng được liên kết đã có một đối tượng được liên kết khác. Không thể thêm đối tượng được liên kết lồng nhau.
Đối tượng liên kết không được có một đối tượng liên kết khác.
Đối tượng đã được liên kết với một đối tượng khác. Không thể thêm các đối tượng liên kết lồng nhau.
Đối tượng chính không được là một đối tượng được liên kết.
Không thể thêm bất kỳ đối tượng liên kết nào nữa, đã vượt quá giới hạn.
Đã đạt đến giới hạn 50 thẻ và vé được liên kết cho thẻ và vé chí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-08-17 UTC."],[[["\u003cp\u003eAuto Linked Passes enable you to send additional passes to users who already have your existing pass in Google Wallet, pre-linking them for a seamless experience.\u003c/p\u003e\n"],["\u003cp\u003eThis feature supports various pass types like event tickets, boarding passes, loyalty cards, offers, and more, allowing for diverse use cases such as linking meal vouchers to boarding passes or parking passes to event tickets.\u003c/p\u003e\n"],["\u003cp\u003eTo utilize Auto Linked Passes, the primary and linked passes must share the same issuer ID, with a limit of 50 linked passes per primary pass, and automatic pushing is best-effort, so alternative communication might be needed for critical use cases.\u003c/p\u003e\n"],["\u003cp\u003eIntegration involves creating or updating the primary pass object with the linked object's ID in the linkedObjectIds parameter, requiring a minimum payload including issuer ID, primary object/class ID, and linked object ID.\u003c/p\u003e\n"],["\u003cp\u003ePotential errors include mismatched issuer IDs, self-referencing linked objects, non-existent linked objects, exceeding the linked pass limit, and attempting nested linked object structures, which should be avoided for successful implementation.\u003c/p\u003e\n"]]],["Auto Linked Passes enable sending or pre-linking additional passes to a user's existing primary pass in Google Wallet. Supported pass types include event tickets, boarding passes, and loyalty cards. To link, create both primary and linked objects, then update the primary object with the linked object's ID. Both objects must share the same issuer ID. There's a 50-linked-pass limit per primary pass. Linking is best-effort; other channels are recommended for critical cases.\n"],null,["Background\n\nThe Auto Linked Passes feature lets you send additional passes to a\nuser who already has your existing pass in their Google Wallet. You can also\npre-link passes to a primary pass when a user saves the **primary**\n(main) pass. The Auto Linked Pass is grouped with the primary pass with a\ncallout above the primary pass informing the user that a new pass has been\nlinked. The following pass types are supported as primary or linked passes;\n\n- Event ticket\n- Boarding pass\n- Transit pass\n- Offer\n- Gift card\n- Loyalty pass\n- Generic pass\n\n|--------------------------------------------------------------|-------------------------------------|\n| | |\n| Primary pass with the callout that a new pass has been added | New pass linked to the primary pass |\n\nUse Cases\n\nYou may have different use cases for linking passes to an existing pass. Some\nexamples include:\n\n- Link an offer to an existing loyalty card.\n- Link a meal voucher to a boarding pass or event ticket.\n- Link a parking pass to an event ticket.\n\nSome considerations when using Auto Linked Passes\n\n- The primary object and linked object must use the same issuerId.\n- There is a limit of 50 linked objects per primary object.\n- Pushing linked passes automatically is not guaranteed and considered best-effort. Users can opt out of receiving Auto Linked Passes. If the use case is critical and the user must receive the linked pass, we recommend communicating through another channel to ensure the user adds the pass.\n- Updates to the [Google Wallet AUP](https://payments.developers.google.com/terms/aup) include guidance on the use of Auto Linked Passes which must be adhered to.\n\nIntegration Steps\n\nIf you have already created a **primary** object you can skip step 1.\n\n1. Create an [object](/wallet/tickets/events/use-cases/create) of any pass type listed with the required parameters. This is the **primary** object.\n2. Create another object of any pass type listed. This is going to be the **linked** object.\n3. Either before or after the primary object is saved, [update](/wallet/tickets/events/use-cases/update) the primary object with the ID of the linked object in the linkedObjectIds parameter.\n\nThere is a minimum payload required to set the linkedObjectIds on a primary\npass. The 3 required parameters include;\n\n1. ISSUERID.PRIMARY_OBJECT_ID\n2. ISSUERID.PRIMARY_CLASS_ID\n3. ISSUERID.LINKED_OBJECT_ID\n\nExample JSON Request to add a linked object to a pass object \n\n```carbon\n ...\n {\n \"id\": \"ISSUERID.PASS_OBJECTID\",\n \"classId\": \"ISSUERID.PASS_CLASSID\",\n \"barcode\": {\n \"type\": \"qrCode\",\n \"value\": \"QR code\"\n },\n \"linkedObjectIds\": {\"ISSUERID.LINKED_PASS_OBJECTID\"}\n }\n ...\n```\n\nExample JSON Response after linking an object to a pass object \n\n```scdoc\n …\n \"state\": \"active\",\n \"linkedObjectIds\": {\n \"ISSUERID.LINKED_PASS_OBJECTID\"\n }\n …\n```\n\nExpected behavior\n\nAfter receiving a successful response, devices with the pass you updated\nshould receive the linked pass. This linked pass will be grouped together with\nthe primary pass. Users can see the linked pass by swiping right.\n\nException handling\n\nPotential errors may happen with incorrect use of the API which can\ninclude;\n\n| **Message** | **Reason** |\n|------------------------------------------------------------------------------------|----------------------------------------------------------------------|\n| Primary object and linked object don't share the same issuer ID. | You cannot attach a linked object to another issuer's object. |\n| Primary object and linked object refer to the same object. | You cannot attach the same object as the linkedObject. |\n| Linked object does not exist. | The linked object should already be inserted into the Wallet API. |\n| Linked object already has another linked object. Cannot add nested linked objects. | Linked objects cannot have another linked object. |\n| Object is already linked to another object. Cannot add nested linked objects. | Primary object cannot be a linked object by itself. |\n| Cannot add any more linked objects, limit exceeded. | The limit of 50 linked passes has been reached for the primary pass. |"]]