Quy trình Di chuyển và huỷ liên kết đối với vé Motics trong Google Wallet
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.
Trang này mô tả cách triển khai quy trình di chuyển và huỷ liên kết quy trình bán vé cho vé của Motics. Để mang lại trải nghiệm tốt cho người dùng, người dùng phải có thể di chuyển phiếu yêu cầu của Motics từ thiết bị này sang thiết bị khác, trong một số giới hạn nhất định do công ty phát hành xác định. Tổ chức phát hành thẻ chỉ được dùng một vé trên một thiết bị. Người dùng phải xoá phiếu yêu cầu hỗ trợ gốc trước khi lưu vào một thiết bị mới. Nếu người dùng không thể xoá vé gốc (có thể do họ làm mất thiết bị), thì tổ chức phát hành phải huỷ liên kết vé khỏi thiết bị cũ.
Yêu cầu về quy trình di chuyển và huỷ liên kết
Quy trình Di chuyển và huỷ liên kết phải đáp ứng các yêu cầu sau:
- Mỗi lần, bạn chỉ được dùng vé Motics trên một thiết bị.
- Người dùng phải chuyển được vé Motics sang thiết bị mới trong các trường hợp sau:
- Quyền truy cập vào thiết bị cũ, chẳng hạn như khi nâng cấp lên một thiết bị mới.
- Không có quyền truy cập vào thiết bị cũ, chẳng hạn như khi thiết bị bị mất hoặc bị đánh cắp.
- Số lượt di chuyển hoặc số lượt kích hoạt vé phải được giới hạn ở các chế độ kiểm soát phù hợp ở phía công ty phát hành vé Motics, như được xác định trong các yêu cầu kinh doanh của PTO.
Trải nghiệm Người dùng
Phần này mô tả chi tiết hơn hai tình huống khác nhau đối với Trải nghiệm người dùng, tuỳ thuộc vào việc người dùng có còn quyền truy cập vào thiết bị cũ hay không khi cố gắng di chuyển phiếu yêu cầu hỗ trợ trên Motics.
Người dùng có quyền truy cập vào thiết bị cũ
Trong những trường hợp như vậy, người dùng có thể bắt đầu quy trình di chuyển từ thiết bị cũ của họ:
- Người dùng xoá vé của Motics khỏi ứng dụng Wallet trên thiết bị cũ.
- Người dùng tìm thấy email xác nhận của công ty phát hành trên thiết bị mới của họ hoặc đăng nhập vào cửa hàng bán vé hoặc cổng thông tin rồi nhấp vào đường liên kết Lưu vào Google Wallet để lưu lại vé vào ứng dụng Google Wallet.
Người dùng không có quyền truy cập vào thiết bị cũ
Khi người dùng không có quyền truy cập vào thiết bị cũ của mình, họ cần bắt đầu quy trình huỷ liên kết và di chuyển từ cổng bán vé của cửa hàng trực tuyến hoặc bằng cách liên hệ với bộ phận hỗ trợ khách hàng của công ty phát hành để họ có thể bắt đầu quy trình huỷ liên kết thay cho người dùng.
- Người dùng sẽ thấy email xác nhận từ công ty phát hành kèm theo hướng dẫn gọi cho dịch vụ khách hàng để được hỗ trợ hoặc bắt đầu quy trình huỷ liên kết khỏi trang web của công ty phát hành hoặc cổng thông tin bán vé. Đây có thể là nút huỷ liên kết trên cổng thông tin bán vé.
- Tổ chức phát hành thay mặt người dùng huỷ liên kết phiếu yêu cầu hỗ trợ khỏi thiết bị cũ (xem thêm thông tin chi tiết trong phần Trách nhiệm của tổ chức phát hành).
- Vé sẽ không sử dụng được (mã vạch sẽ không quét) trên thiết bị ban đầu ngay khi tổ chức phát hành huỷ liên kết.
- Nhà phát hành nên đưa vé cũ vào danh sách từ chối để đảm bảo thiết bị kiểm tra không thể quét vé nữa.
- Vé sẽ tự động được xoá khỏi thiết bị ban đầu ngay khi thiết bị kết nối mạng trở lại (nỗ lực tối đa).
- Người dùng tìm thấy email xác nhận của công ty phát hành trên thiết bị mới của họ hoặc đăng nhập vào cửa hàng bán vé hoặc cổng thông tin rồi nhấp vào đường liên kết Lưu vào Google Wallet để lưu lại vé vào ứng dụng Google Wallet.
Trách nhiệm của nhà phát hành
- Trong quá trình thiết lập ban đầu, nhà phát hành phải chèn thẻ Transit bằng
multipleDevicesAndHoldersAllowedStatus=ONE_USER_ONE_DEVICE
.
- Email xác nhận mà tổ chức phát hành gửi cho người dùng tại thời điểm mua phải chứa hướng dẫn về cách chuyển vé sang thiết bị mới.
- Email xác nhận phải chứa giá trị nhận dạng của phiếu yêu cầu trợ giúp trong quy trình hỗ trợ.
- Để giảm số lượng liên hệ, đơn vị phát hành cũng nên có nút huỷ liên kết trên cửa hàng web hoặc cổng thông tin bán vé để người dùng có thể quản lý vé.
- Tổ chức phát hành chịu trách nhiệm giới hạn số lần có thể kích hoạt một vé. Điều này nhằm tránh việc người dùng chuyển cùng một vé qua lại giữa các thiết bị (cả hai đều đăng nhập vào cùng một tài khoản trên Wallet) vô thời hạn.
- Nhà phát hành phải theo dõi số lần điểm cuối kích hoạt được gọi cho cùng một đối tượng ID và từ chối yêu cầu kích hoạt nếu vượt quá giới hạn.
- Vì mỗi công ty phát hành có quy tắc riêng về số lần di chuyển vé, nên Google yêu cầu các nhà phát hành xử lý việc giới hạn việc di chuyển vé ở phía họ.
- Nếu người dùng muốn huỷ liên kết phiếu yêu cầu hỗ trợ bằng cách liên hệ với bộ phận hỗ trợ khách hàng:
- Nếu người dùng không thể xoá vé khỏi thiết bị cũ, thì tổ chức phát hành sẽ huỷ liên kết vé bằng cách gọi
transitObject:patch
thông qua {hasLinkedDevice:false}
cho objectId
của vé.
- Công ty phát hành cần phải tìm ID đối tượng cho phiếu yêu cầu hỗ trợ đã cho. Họ nên tìm kiếm thông tin này dựa trên giá trị nhận dạng được cung cấp cho người dùng trong email xác nhận.
- Nếu người dùng bắt đầu quy trình huỷ liên kết trên cửa hàng web hoặc cổng thông tin bán vé:
- Tổ chức phát hành huỷ liên kết phiếu yêu cầu hỗ trợ bằng cách gọi
transitObject:patch
thông qua {hasLinkedDevice:false}
đối với objectId
của vé.
- Nhà phát hành nên đưa vé cũ vào danh sách từ chối để các thiết bị kiểm tra không thể quét vé nữa.
Trách nhiệm của Google
Để nhận được lệnh gọi transitObject:patch
có lệnh gọi {hasLinkedDevice:false}
, Google sẽ thu hồi chứng chỉ hiện có (nếu có) với máy chủ Motics. Nếu người dùng vẫn giữ vé ban đầu trên thiết bị cũ, thì mã vạch sẽ không còn hoạt động vì sẽ bị xoá khỏi thiết bị cũ miễn là thiết bị đó có kết nối mạng hoặc có kết nối mạng trở lại.
Biểu đồ trình tự
Hình 1. Quy trình huỷ liên kết vé Motics 
Hình 1 cho thấy các lệnh gọi transitObject:patch
và pruneTree()
diễn ra để huỷ liên kết vé khi người dùng không còn quyền truy cập vào thiết bị cũ của họ.
Trừ phi có lưu ý khác, nội dung của trang này được cấp phép theo Giấy phép ghi nhận tác giả 4.0 của Creative Commons và các mẫu mã lập trình được cấp phép theo Giấy phép Apache 2.0. Để biết thông tin chi tiết, vui lòng tham khảo Chính sách trang web của Google Developers. Java là nhãn hiệu đã đăng ký của Oracle và/hoặc các đơn vị liên kết với Oracle.
Cập nhật lần gần đây nhất: 2025-08-29 UTC.
[null,null,["Cập nhật lần gần đây nhất: 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."]]