Bạn có thể yêu cầu tăng cường bảo mật khi người dùng sử dụng thẻ/vé của họ hoặc sử dụng thẻ của họ. Để biết thông tin chi tiết, hãy xem phần Bảo vệ bằng phương thức khoá màn hình.
Chạm NFC
Người dùng của bạn có thể đổi thẻ một cách liền mạch bằng cách nhấn NFC. Tìm hiểu thêm về tính năng Chạm thông minh và đăng ký tính năng Chạm thông minh.
Quét mã vạch
Giúp khách hàng của bạn quét Thẻ và vé bằng cách đính kèm mã vạch.
Mã vạch tĩnh
Bạn có thể hiển thị mã vạch tĩnh bằng cách đặt object.barcode.
API cung cấp nhiều loại mã vạch khác nhau. Để biết thêm thông tin chi tiết, hãy xem loại Barcode.
Xoay mã vạch
Để tăng cường bảo mật, bạn có thể hiển thị mã vạch xoay vòng bằng cách đặt
object.rotatingBarcode. Việc xoay mã vạch trông giống như mã vạch thông thường nhưng thay đổi định kỳ mỗi phút một lần và thiết bị đầu cuối/trình đọc được lập trình để chỉ chấp nhận mã gần đây nhất. Điều này giúp giảm nguy cơ liên quan đến việc chụp ảnh màn hình bằng mã vạch, cụ thể là
hành vi trộm vé hoặc bán lại vé trái phép. Để biết thêm thông tin chi tiết, hãy xem loại RotatingBarcode.
Ảnh động bảo mật
Một cách khác để ngăn chặn việc sử dụng ảnh chụp màn hình sai mục đích là hiển thị ảnh động bảo mật bằng mã vạch. Ảnh này có hỗ trợ quy trình xác minh thẻ và vé thủ công.
Biểu hiện thực tế của ảnh động bảo mật là một đường viền nhấp nháy xung quanh mã vạch của thẻ và vé. Ảnh động sáng lên này chỉ kích hoạt khi thiết bị chuyển động. Vì vậy, người dùng có thể kiểm tra tính hợp lệ của thẻ và vé bằng cách nghiêng thiết bị. Mặt khác, việc giữ thiết bị vẫn sẽ chỉ tạo ảnh động bảo mật đầy màu sắc theo vòng lặp.
Để bật ảnh động bảo mật cho thẻ và vé, trong lớp thẻ và vé, hãy đặt AnimationType của trường SecurityAnimation thành FOIL_SHIMMER.
Xem Hình 1. bên dưới để biết ví dụ về cách ảnh động bảo mật xuất hiện khi được bật:
Hình 1.
Bảo vệ bằng phương thức khoá màn hình
Để bảo vệ quyền truy cập của khách hàng vào thẻ và vé, bạn có thể yêu cầu phương thức khoá màn hình
mỗi khi họ thêm hoặc truy cập vào thẻ và vé. Bạn có thể thực hiện việc này bằng cách đặt class.viewUnlockRequirement.
Để biết thêm thông tin chi tiết, hãy xem loại ViewUnlockRequirement.
[[["Dễ hiểu","easyToUnderstand","thumb-up"],["Giúp tôi giải quyết được vấn đề","solvedMyProblem","thumb-up"],["Khác","otherUp","thumb-up"]],[["Thiếu thông tin tôi cần","missingTheInformationINeed","thumb-down"],["Quá phức tạp/quá nhiều bước","tooComplicatedTooManySteps","thumb-down"],["Đã lỗi thời","outOfDate","thumb-down"],["Vấn đề về bản dịch","translationIssue","thumb-down"],["Vấn đề về mẫu/mã","samplesCodeIssue","thumb-down"],["Khác","otherDown","thumb-down"]],["Cập nhật lần gần đây nhất: 2025-09-04 UTC."],[[["\u003cp\u003ePasses can be redeemed via NFC tap or barcode scan, offering users flexible options.\u003c/p\u003e\n"],["\u003cp\u003eRotating barcodes and security animations enhance security by mitigating risks like ticket theft and unauthorized resale.\u003c/p\u003e\n"],["\u003cp\u003ePasses can include a screen lock requirement for added security, protecting customer access.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers have access to various barcode types and customization options through the API, enabling them to tailor the pass experience.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Pay's Smart Tap technology facilitates seamless redemption through NFC.\u003c/p\u003e\n"]]],["Passes can be redeemed via NFC tap or barcode scan. For barcodes, options include static or rotating types, with rotating barcodes enhancing security by changing regularly. An optional security animation, a shimmering effect triggered by device motion, further validates pass authenticity. Extra security can be added by requiring a screen lock each time a user accesses or adds a pass, configured via `class.viewUnlockRequirement`. The barcode can be added by setting `object.barcode`.\n"],null,["# Redeem an Event ticket\n\nPasses can be redeemed in either of two ways:\n\n- [NFC tap](#use-nfc-tap)\n- [Barcode scan](#use-barcode-scan)\n\nYou can optionally require extra security when users redeem or access their pass. For details,\nsee [Protect with Screen Lock](#protect-with-screen-lock).\n\nNFC tap\n-------\n\nYour users can seamlessly redeem their cards using an NFC tap. Learn more about\n[Smart Tap](/wallet/smart-tap), and\n[sign up](https://support.google.com/pay/merchants/contact/smart_tap_support) for Smart\nTap.\n\nBarcode scan\n------------\n\nHelp your customers scan their Pass by attaching a barcode.\n\n### Static barcode\n\nYou can display a static barcode by setting `object.barcode`.\nThe API provides a variety of barcode types. For more details, see the\n[`Barcode` type](/wallet/tickets/events/rest/v1/Barcode).\n\n### Rotating barcode\n\n\nFor additional security, you can display a rotating barcode by setting\n`object.rotatingBarcode`. Rotating barcodes look just like regular barcodes but\nchange periodically, typically every minute, and the terminal/reader is programmed to only\naccept the most recent one. This reduces the risks associated with barcode screenshotting, in\nparticular ticket theft or unauthorized ticket resale. For more details, see the\n[`RotatingBarcode` type](/wallet/tickets/events/rest/v1/RotatingBarcode).\n\n### Security animation\n\n\nAnother way to prevent screenshot abuse is by displaying the barcode security animation, which\nsupports human-verification of a pass.\n\n\nThe physical manifestation of a security animation is a shimmering outline around the barcode of\nthe pass. This shimmering animation triggers only when the device is in motion so one can test\nthe pass' validity by tilting the device. On the other hand holding the device still will only\nanimate the colorful security animation in loop.\n\n\nTo enable security animation for a pass, in the pass class, set the [`SecurityAnimation`](/wallet/tickets/events/rest/v1/SecurityAnimation)\nfield's [`AnimationType`](/wallet/tickets/events/rest/v1/SecurityAnimation#AnimationType)\nto `FOIL_SHIMMER`.\n\n\nSee Figure 1. below for an example of how the security animation appears when it is enabled:\n\n\n**Figure 1.**\n\nProtect with Screen Lock\n------------------------\n\nTo protect your customer's access to their Pass, you can require a screen\nlock each time they add or access their pass. This can be done by setting `class.viewUnlockRequirement`.\nFor more details, see the\n[`ViewUnlockRequirement` type](/wallet/tickets/events/rest/v1/ViewUnlockRequirement)."]]