העברה וביטול הקישור של התהליך לכרטיסים Motics ב-Google Wallet
קל לארגן דפים בעזרת אוספים
אפשר לשמור ולסווג תוכן על סמך ההעדפות שלך.
בדף זה מוסבר איך להטמיע העברה ולבטל את הקישור של זרימת הכרטיסים לכרטיסים של Motics. כדי לספק חוויית משתמש טובה, למשתמש צריכה להיות אפשרות להעביר את הכרטיס שלו ב-Motics ממכשיר אחד לאחר, במגבלות מסוימות שהוגדרו על ידי המנפיק. המנפיק צריך להגביל את הכרטיס למכשיר אחד. המשתמש צריך למחוק את הכרטיס המקורי לפני השמירה במכשיר חדש. אם המשתמש לא יכול למחוק את הכרטיס המקורי (אולי בגלל שהמכשיר אבד), המנפיק צריך לבטל את קישור הכרטיס מהמכשיר הישן.
דרישות לגבי זרימה וביטול הקישור
הזרימה 'העברה וביטול קישור' צריכה לעמוד בדרישות הבאות:
- אפשר להשתמש בכרטיס Motics רק במכשיר אחד בכל פעם.
- במקרים הבאים, צריכה להיות למשתמש אפשרות להעביר את הכרטיס של Motics למכשיר חדש:
- גישה למכשיר ישן, למשל כשמשדרגים למכשיר חדש.
- אין גישה למכשיר הישן, למשל אם מכשיר אבד או נגנב.
- מספר ההעברות או הפעלות הכרטיסים צריך להיות מוגבל על ידי אמצעי בקרה מתאימים בצד של מנפיק הכרטיס, כפי שמוגדר בדרישות העסקיות של ה-PTO.
חווית המשתמש
בקטע הזה מתוארים בפירוט שני התרחישים השונים של חוויית המשתמש, בהתאם לשאלה אם עדיין יש למשתמש גישה למכשיר הישן שלו כשהוא מנסה להעביר כרטיס של Motics.
למשתמש יש גישה למכשיר הישן
במקרים כאלה, המשתמש יכול להתחיל את תהליך ההעברה מהמכשיר הישן שלו:
- המשתמש מחק את הכרטיס של Motics מאפליקציית Wallet במכשיר הישן שלו.
- המשתמש מוצא את הודעת האישור מהמנפיק במכשיר החדש שלו, או מתחבר לחנות האינטרנט של הכרטיסים או בפורטל הכרטיסים, ולוחץ על קישור 'שמירה ב-Google Wallet' כדי לשמור מחדש את הכרטיס באפליקציית Google Wallet.
למשתמש אין גישה למכשיר הישן
אם למשתמש אין גישה למכשיר הישן, הוא צריך להתחיל את תהליך ביטול הקישור ולהעביר אותו מפורטל הכרטיסים של חנות האינטרנט או על ידי יצירת קשר עם תמיכת הלקוחות של המנפיק, שיכול להתחיל את תהליך ביטול הקישור בשמו של המשתמש.
- המשתמש מוצא את הודעת האישור באימייל מהמנפיק, עם הוראות להתקשרות לשירות הלקוחות לקבלת עזרה, או מתחיל תהליך של ביטול הקישור מהאתר של המנפיק או מפורטל הכרטיסים. זה יכול להיות לחצן לביטול קישור בפורטל הכרטיסים.
- המנפיק מבטל את הקישור של הכרטיס למכשיר הישן בשם המשתמש (פרטים נוספים בקטע תחומי האחריות של המנפיק).
- אי אפשר להשתמש בכרטיס (לא ניתן לסרוק את הברקוד) במכשיר המקורי מיד אחרי שהמנפיק מבטל את הקישור שלו.
- המנפיק צריך להוסיף לרשימת הישויות שנחסמו את הכרטיס הישן, כדי לוודא שלא ניתן יהיה לסרוק אותו יותר במכשירים לבדיקה.
- הכרטיס יימחק אוטומטית מהמכשיר המקורי ברגע שהוא יתחבר שוב לאינטרנט (הדרך הטובה ביותר).
- המשתמש מוצא את הודעת האישור מהמנפיק במכשיר החדש שלו, או מתחבר לחנות האינטרנט של הכרטיסים או בפורטל הכרטיסים, ולוחץ על קישור 'שמירה ב-Google Wallet' כדי לשמור מחדש את הכרטיס באפליקציית Google Wallet.
תחומי האחריות של המנפיק
- במהלך ההגדרה הראשונית, המנפיק צריך להכניס את ה-TransitClass עם
multipleDevicesAndHoldersAllowedStatus=ONE_USER_ONE_DEVICE
.
- הודעת האישור שהמנפיק שולח למשתמש בזמן הרכישה צריכה לכלול הוראות להעברת הכרטיס למכשיר חדש.
- הודעת האישור באימייל צריכה לכלול מזהה של הפנייה לקבלת עזרה בתהליך התמיכה.
- כדי שנפח הפניות יהיה מינימלי, המנפיק צריך להציג גם לחצן לביטול הקישור בחנות האינטרנט או בפורטל הכרטיסים שבו המשתמש יכול לנהל את הכרטיס שלו.
- המנפיק אחראי להגביל את מספר הפעמים שאפשר להפעיל כרטיס. כך, המשתמשים לא יוכלו להעביר את אותו כרטיס הלוך ושוב בין מכשירים (שניהם מחוברים לאותו חשבון ב-Wallet) ללא הגבלת זמן.
- המנפיק צריך לעקוב אחרי מספר הפעמים שבוצעה קריאה לנקודת הקצה להפעלה עבור אותו objectId, ולדחות את בקשת ההפעלה במקרה שהיא חורגת מהמגבלה.
- מכיוון שלכל מנפיק יש כללים משלו לגבי מספר הפעמים שאפשר להעביר כרטיס, Google דורשת מהמנפיקים לטפל בהגבלת מספר הכרטיסים בצד שלהם.
- אם המשתמש רוצה לבטל את הקישור לכרטיס על ידי פנייה לתמיכת הלקוחות:
- אם המשתמש לא יכול להסיר את הכרטיס מהמכשיר הישן, המנפיק מבטל את הקישור של הכרטיס על ידי התקשרות אל
transitObject:patch
עם {hasLinkedDevice:false}
בשביל objectId
של הכרטיס.
- המנפיק יצטרך למצוא את מזהה האובייקט של הכרטיס הנתון. הוא צריך לחפש את זה לפי המזהה שניתן למשתמש בהודעת האישור באימייל.
- אם המשתמש מתחיל את תהליך ביטול הקישור בחנות האינטרנט או בפורטל הכרטיסים:
- המנפיק מבטל את הקישור של הכרטיס על ידי התקשרות אל
transitObject:patch
עם
{hasLinkedDevice:false}
עבור objectId
של הכרטיס.
- המנפיק צריך להוסיף לרשימת הישויות שנחסמו את הכרטיס הישן, כך שאי אפשר יהיה לסרוק אותו יותר במכשירים לבדיקה.
תחומי האחריות של Google
בתגובה לקבלת הקריאה transitObject:patch
עם {hasLinkedDevice:false}
, Google תבטל את האישור הקיים (אם יש כזה) בשרת Motics. אם המכשיר הישן של המשתמש עדיין נמצא ברשותו, עם הכרטיס המקורי, הברקוד לא יעבוד יותר כי הוא יימחק מהמכשיר הישן כל עוד הוא מחובר לאינטרנט או חוזר לאינטרנט.
תרשים רצף
איור 1. שלב
של ביטול הקישור של כרטיס Motics
באיור 1 מוצגות השיחות transitObject:patch
ו-pruneTree()
שמתבצעות לביטול קישור של כרטיס כשלמשתמש כבר אין גישה למכשיר הישן.
אלא אם צוין אחרת, התוכן של דף זה הוא ברישיון Creative Commons Attribution 4.0 ודוגמאות הקוד הן ברישיון Apache 2.0. לפרטים, ניתן לעיין במדיניות האתר Google Developers. Java הוא סימן מסחרי רשום של חברת Oracle ו/או של השותפים העצמאיים שלה.
עדכון אחרון: 2025-08-29 (שעון UTC).
[null,null,["עדכון אחרון: 2025-08-29 (שעון UTC)."],[[["\u003cp\u003eMotics tickets are designed for single-device use, requiring users to move a ticket from their old device to a new one when switching devices.\u003c/p\u003e\n"],["\u003cp\u003eUsers with access to their old device can move a ticket by deleting it from the old device and then resaving it to their new device via a confirmation email or the issuer's platform.\u003c/p\u003e\n"],["\u003cp\u003eIf the old device is inaccessible, users must initiate an unlink flow through the issuer's customer support or online portal, after which they can resave the ticket to their new device.\u003c/p\u003e\n"],["\u003cp\u003eIssuers are responsible for implementing controls to limit the number of times a ticket can be moved and for unlinking tickets from lost or stolen devices using the \u003ccode\u003etransitObject:patch\u003c/code\u003e API call.\u003c/p\u003e\n"],["\u003cp\u003eGoogle assists in the unlink flow by revoking the old ticket's certificate and ensuring it's unusable, with the old ticket automatically deleted from the device when it comes online.\u003c/p\u003e\n"]]],["Motics ticket issuers must enable users to move tickets between devices, limiting usage to one device at a time. When a user has access to the old device, they must delete the ticket before saving it to a new device. Without access, the issuer must unlink the ticket via a web portal or customer support. The issuer updates the ticket status via an API call, which revokes the old device's ticket certificate, deletes the ticket from the old device and then should also denylist it to prevent it from being scanned. The issuer is also responsible for limiting the number of ticket moves.\n"],null,["# Move & Unlink Flow for Motics tickets in Google Wallet\n\nThis page describes implementing a move and unlink ticket flow for Motics\ntickets. To provide a good user experience, a user should be able to move their\nMotics ticket from one device to another, within certain limits defined by the\nissuer. The issuer has to restrict a ticket to one device. The user must delete\nthe original ticket before saving it to a new device. If the user cannot delete\nthe original ticket (perhaps because they lost the device), the issuer must\nunlink the ticket from the old device.\n\nMove \\& Unlink Flow Requirements\n--------------------------------\n\nThe Move \\& Unlink flow has to fulfil the following requirements:\n\n- A Motics ticket must only be usable on one device at a time.\n- The user must be able to move the Motics ticket to a new device in these cases:\n - Access to old device, for example when upgrading to a new device.\n - No access to old device, for example when a device is lost or stolen.\n- The number of moves or ticket activations should be limited by suitable controls on the Motics ticket issuer side, as defined by the PTO's business requirements.\n\nUser Experience\n---------------\n\nThis section describes in more detail the two different scenarios for the User\nExperience, depending on whether the user still has access to their old device\nwhen attempting to move a Motics ticket.\n\n### User has access to old device\n\nIn such cases, the user can initiate the move flow from their old device:\n\n1. The user deletes the Motics ticket from the Wallet app on their old device.\n2. The user finds the confirmation email from the issuer on their new device or logs in to the ticketing webshop or portal and clicks a Save to Google Wallet link to resave the ticket to the Google Wallet app.\n\n### User does not have access to old device\n\nWhen the user does not have access to their old device, they need to initiate\nthe unlink and move flow from either the webshop ticketing portal, or by\ncontacting the customer support of the issuer, that can initiate the unlink flow\non the user's behalf.\n\n1. The user finds the confirmation email from the issuer with instructions to call customer service for assistance or starts an unlink flow from the issuer website or ticketing portal. This could be an unlink button on the ticketing portal.\n2. The issuer unlinks the ticket from the old device on behalf of the user (more details in the [Issuer Responsibilities](#issuer-responsibilities) section).\n3. The ticket will be unusable (barcode won't scan) on the original device as soon as the issuer unlinks it.\n4. The issuer should denylist the old ticket, to ensure it can no longer be scanned by inspection devices.\n5. The ticket will automatically be deleted from the original device as soon as it comes online again (best-effort).\n6. The user finds the confirmation email from the issuer on their new device or logs in to the ticketing webshop or portal and clicks a Save to Google Wallet link to resave the ticket to the Google Wallet app.\n\nIssuer Responsibilities\n-----------------------\n\n- During initial setup the issuer must [insert the transitClass](/wallet/tickets/transit-passes/qr-code/motics/technical-details#transitClassInsert) with `multipleDevicesAndHoldersAllowedStatus=ONE_USER_ONE_DEVICE`.\n- The confirmation email that the issuer sends to the user at purchase time has to contain instructions for how to move the ticket to a new device.\n- The confirmation email has to contain an identifier for the ticket to the help in the support process.\n- To keep contact volume to a minimum, the issuer should also have an unlink button on their webshop or ticket portal where a user can manage their ticket.\n- The issuer is responsible for limiting the number of times a ticket can be activated. This is to avoid users moving the same ticket back and forth between devices (both logged into the same account on Wallet) indefinitely.\n - The issuer has to keep track of how many times the activation endpoint is called for the same objectId, and reject the activation request if it exceeds the limit.\n - Since each issuer has its own rules on how many times a ticket can be moved, Google requires that issuers handle limiting ticket moves on their end.\n- If the user wants to unlink the ticket through contacting customer support:\n - If the user cannot remove the ticket from the old device, the issuer unlinks the ticket by calling `transitObject:patch` with `{hasLinkedDevice:false}` for the `objectId` of the ticket.\n - The issuer will need to find the objectId for the given ticket. They should look this up based on the identifier given to the user in the confirmation email.\n- If the user initiates the unlink flow on the webshop or ticket portal:\n - The issuer unlinks the ticket by calling `transitObject:patch` with `{hasLinkedDevice:false}` for the `objectId` of the ticket.\n- The issuer should denylist the old ticket, so that it can no longer be scanned by inspection devices.\n\nGoogle Responsibilities\n-----------------------\n\nIn response to receiving the `transitObject:patch` with\n`{hasLinkedDevice:false}` call, Google will revoke the existing certificate (if\nthere is one) with the Motics server. If the user does still have their old\ndevice with the original ticket, the barcode will no longer work as it will be\ndeleted from the old device as long as it is online or comes online again.\n\n### Sequence Diagram\n\n**Figure 1.** Motics Ticket Unlink Flow\n\nFigure 1 shows the `transitObject:patch` and `pruneTree()` calls that take place\nto unlink a ticket when the user no longer has access to their old device."]]