Restez organisé à l'aide des collections
Enregistrez et classez les contenus selon vos préférences.
Utiliser un identifiant de regroupement
Par défaut, ajouter plusieurs cartes à un même
Ajouter à Google Wallet ne regroupe pas ces cartes dans le
l'application Google Wallet de l'utilisateur. Cependant, vous pouvez regrouper les cartes
assurez-vous qu'ils ont tous le même identifiant de regroupement. Les cartes groupées s'afficheront ensemble
dans l'application Google Wallet. Lorsqu'un groupe de cartes est sélectionné, chaque carte
être affichées dans un carrousel.
Les cartes peuvent être regroupées:
Lors du provisionnement initial
En utilisant la propriété
update
ou
patch
méthodes
Pour ajouter une carte à un groupe, la propriété groupingInfo.groupingId de
l'objet de carte doit être défini. Tous les objets Cartes ayant le même
La valeur groupingId sera automatiquement regroupée, même si
ils ont été ajoutés séparément.
L'exemple suivant montre comment regrouper une carte de fidélité et une offre
incitent l'utilisateur à utiliser les deux lors de son prochain achat.
Sauf indication contraire, le contenu de cette page est régi par une licence Creative Commons Attribution 4.0, et les échantillons de code sont régis par une licence Apache 2.0. Pour en savoir plus, consultez les Règles du site Google Developers. Java est une marque déposée d'Oracle et/ou de ses sociétés affiliées.
Dernière mise à jour le 2025/09/04 (UTC).
[[["Facile à comprendre","easyToUnderstand","thumb-up"],["J'ai pu résoudre mon problème","solvedMyProblem","thumb-up"],["Autre","otherUp","thumb-up"]],[["Il n'y a pas l'information dont j'ai besoin","missingTheInformationINeed","thumb-down"],["Trop compliqué/Trop d'étapes","tooComplicatedTooManySteps","thumb-down"],["Obsolète","outOfDate","thumb-down"],["Problème de traduction","translationIssue","thumb-down"],["Mauvais exemple/Erreur de code","samplesCodeIssue","thumb-down"],["Autre","otherDown","thumb-down"]],["Dernière mise à jour le 2025/09/04 (UTC)."],[[["\u003cp\u003eMultiple passes added to Google Wallet can be grouped together by assigning them the same \u003ccode\u003egroupingId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGrouped passes are displayed together in the Google Wallet app, allowing users to easily access related passes.\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 used to specify the group for a pass.\u003c/p\u003e\n"]]],["Passes in Google Wallet can be grouped by assigning them a shared `groupingId`. This can be done during the initial provisioning or later using `update` or `patch` methods. Setting the `groupingInfo.groupingId` property to the same value for multiple passes ensures they appear together as a carousel in the user's Wallet app. The `sortIndex` property within `groupingInfo` is used to arrange the order of passes. Example: A loyalty card and offer are grouped with the same ID.\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/generic/rest/v1/genericobject/update) or [`patch`](/wallet/generic/rest/v1/genericobject/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```"]]