קיבוץ מספר כרטיסים
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
שימוש במזהה קיבוץ
כברירת מחדל, הוספת כמה כרטיסים לכרטיס אחד
הקישור הוספה ל-Google Wallet לא יקבץ את הכרטיסים האלה ב
באפליקציית Google Wallet של המשתמש. עם זאת, אפשר לקבץ את הכרטיסים יחד.
לוודא שלכולם יש אותו מזהה קיבוץ. הכרטיסים שמקובצים יופיעו יחד
באפליקציית Google Wallet. כשבוחרים קבוצה של כרטיסים, כל כרטיס
מוצג בקרוסלה.
אפשר לקבץ את הכרטיסים יחד:
- במהלך ההקצאה הראשונית
-
באמצעות
update
או
patch
אמצעי תשלום
כדי להוסיף כרטיס לקבוצה, המאפיין groupingInfo.groupingId
של
צריך להגדיר את אובייקט ה-pass. כל האובייקטים של העברת הנתונים עם אותם
הערך של groupingId
יקובץ יחד באופן אוטומטי, גם אם
הם נוספו בנפרד.
בדוגמה הבאה מוצג כרטיס מועדון לקוחות ומבצע שמקובצים יחד.
תעודדו את המשתמשים להשתמש בשניהם ברכישה הבאה.
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",
},
}
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-29 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-29 (שעון UTC)."],[[["\u003cp\u003eAdding multiple passes to a single Google Wallet link will not group them by default, but you can group them using the same \u003ccode\u003egroupingId\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eGrouped passes appear together in the Google Wallet app and can be provisioned together or grouped later using the \u003ccode\u003eupdate\u003c/code\u003e or \u003ccode\u003epatch\u003c/code\u003e methods.\u003c/p\u003e\n"],["\u003cp\u003eTo group passes, set the \u003ccode\u003egroupingInfo.groupingId\u003c/code\u003e property to the same value for all passes you want to group.\u003c/p\u003e\n"],["\u003cp\u003ePasses with the same \u003ccode\u003egroupingId\u003c/code\u003e will be automatically grouped, even if added separately, and displayed in a carousel when selected.\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 provisioning or via `update` or `patch` methods. The `groupingInfo.groupingId` property must be set within the pass object to establish the group. All passes with the same `groupingId` are automatically grouped. An example shows a loyalty card and an offer being linked 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/retail/loyalty-cards/rest/v1/loyaltyobject/update) or [`patch`](/wallet/retail/loyalty-cards/rest/v1/loyaltyobject/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```"]]