Group multiple passes
Stay organized with collections
Save and categorize content based on your preferences.
Use a grouping ID
By default, adding multiple passes to a single
Add to Google Wallet link will not group those passes in the
user's Google Wallet app. However, passes can be grouped together by making
sure they all have the same grouping ID. Grouped passes will appear together
in the Google Wallet app. When a group of passes is selected, each pass will
be shown on a carousel.
Passes can be grouped together:
- During initial provisioning
-
By using the
update
or
patch
methods
To add a pass to a group, the groupingInfo.groupingId
property of
the pass object must be set. All pass objects with the same
groupingId
value will be automatically grouped together, even if
they were added separately.
The following example shows a loyalty card and offer being grouped together to
entice the user to make use of both in their next purchase.
loyaltyObject = {
"classId": "ISSUER_ID.GIFT_CARD_CLASS_SUFFIX",
"id": "ISSUER_ID.GIFT_CARD_OBJECT_SUFFIX",
"state": "ACTIVE",
"groupingInfo": {
# Note the same groupingId value
"groupingId": "combinedGiftCardAndOfferId",
"sortIndex": 1
},
"barcode": {
"type": "QR_CODE",
"value": "QR code"
},
"accountId": "Account id",
"accountName": "Account name",
"loyaltyPoints": {
"label": "Points",
"balance": {
"int": 800
}
}
}
offerObject = {
"classId": "ISSUER_ID.OFFER_CLASS_SUFFIX",
"id": "ISSUER_ID.OFFER_OBJECT_SUFFIX",
"state": "ACTIVE",
"groupingInfo": {
# Note the same groupingId value
"groupingId": "combinedGiftCardAndOfferId",
"sortIndex": 2
},
"barcode": {
"type": "QR_CODE",
"value": "QR code",
},
}
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 2025-09-03 UTC.
[null,null,["Last updated 2025-09-03 UTC."],[[["\u003cp\u003eAdding multiple passes to Google Wallet with the same \u003ccode\u003egroupingId\u003c/code\u003e will group them together, enhancing user experience.\u003c/p\u003e\n"],["\u003cp\u003eGrouped passes are displayed as a carousel when selected in the Google Wallet app.\u003c/p\u003e\n"],["\u003cp\u003ePasses can be grouped during initial creation or later using the \u003ccode\u003eupdate\u003c/code\u003e or \u003ccode\u003epatch\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003egroupingInfo.groupingId\u003c/code\u003e property is essential for assigning passes to a specific group.\u003c/p\u003e\n"],["\u003cp\u003eGrouping passes, such as loyalty cards and offers, can incentivize users to utilize them together.\u003c/p\u003e\n"]]],["Passes in Google Wallet can be grouped by assigning them a shared `groupingId`. This ensures they appear together as a carousel in the user's wallet. Grouping can occur during initial setup or later via `update` or `patch` methods. Setting the `groupingInfo.groupingId` property on each pass object is required. Passes with the same `groupingId` are grouped, even if added separately. The example demonstrates grouping a loyalty card and offer with the same `groupingId`, \"combinedGiftCardAndOfferId\".\n"],null,["# Group multiple passes\n\nUse a grouping ID\n-----------------\n\n\nBy default, adding multiple passes to a single\n**Add to Google Wallet** link will not group those passes in the\nuser's Google Wallet app. However, passes can be grouped together by making\nsure they all have the same grouping ID. Grouped passes will appear together\nin the Google Wallet app. When a group of passes is selected, each pass will\nbe shown on a carousel.\n\nPasses can be grouped together:\n\n- During initial provisioning\n- By using the [`update`](/wallet/retail/gift-cards/rest/v1/giftcardobject/update) or [`patch`](/wallet/retail/gift-cards/rest/v1/giftcardobject/patch) methods\n\n\nTo add a pass to a group, the `groupingInfo.groupingId` property of\nthe pass object must be set. All pass objects with the same\n`groupingId` value will be automatically grouped together, even if\nthey were added separately.\n\n\nThe following example shows a loyalty card and offer being grouped together to\nentice the user to make use of both in their next purchase. \n\n```carbon\nloyaltyObject = {\n \"classId\": \"ISSUER_ID.GIFT_CARD_CLASS_SUFFIX\",\n \"id\": \"ISSUER_ID.GIFT_CARD_OBJECT_SUFFIX\",\n \"state\": \"ACTIVE\",\n \"groupingInfo\": {\n # Note the same groupingId value\n \"groupingId\": \"combinedGiftCardAndOfferId\",\n \"sortIndex\": 1\n },\n \"barcode\": {\n \"type\": \"QR_CODE\",\n \"value\": \"QR code\"\n },\n \"accountId\": \"Account id\",\n \"accountName\": \"Account name\",\n \"loyaltyPoints\": {\n \"label\": \"Points\",\n \"balance\": {\n \"int\": 800\n }\n }\n}\n\nofferObject = {\n \"classId\": \"ISSUER_ID.OFFER_CLASS_SUFFIX\",\n \"id\": \"ISSUER_ID.OFFER_OBJECT_SUFFIX\",\n \"state\": \"ACTIVE\",\n \"groupingInfo\": {\n # Note the same groupingId value\n \"groupingId\": \"combinedGiftCardAndOfferId\",\n \"sortIndex\": 2\n },\n \"barcode\": {\n \"type\": \"QR_CODE\",\n \"value\": \"QR code\",\n },\n}\n```"]]