संग्रह की मदद से व्यवस्थित रहें
अपनी प्राथमिकताओं के आधार पर, कॉन्टेंट को सेव करें और कैटगरी में बांटें.
परिचय
रोटेटिंग बारकोड सामान्य बारकोड की तरह ही दिखता है, लेकिन वह समय-समय पर बदलता रहता है,
आमतौर पर हर मिनट में, और टर्मिनल/रीडर को केवल
सबसे हाल का. सुरक्षा का यह उपाय, अफ़िलिएट प्रोग्राम से जुड़े जोखिमों को कम करता है
बारकोड का स्क्रीनशॉट लेना, खास तौर पर टिकट की चोरी या बिना मंज़ूरी वाले टिकट
रीसेल. रोटेटिंग बारकोड उन डिवाइसों के लिए भी फ़ॉलबैक के तौर पर काम कर सकते हैं जो
एनएफ़सी की सुविधा न होने (हार्डवेयर की कमी होना या
सॉफ़्टवेयर बंद हो गया है).
एपीआई का संदर्भ
बारकोड को घुमाने के बारे में तकनीकी जानकारी के लिए, यह देखें:
RotatingBarcode टाइप.
उपयोगकर्ता के डिवाइस पर, एक समय पर, रिडीम करने का सिर्फ़ एक तरीका इस्तेमाल किया जाता है,
पास को कॉन्फ़िगर करने के तरीके और डिवाइस की क्षमता के हिसाब से.
प्राथमिकता के हिसाब से, नीचे दिए गए रिडीम करने के तरीकों का इस्तेमाल किया जाता है:
स्मार्ट टैप: अगर स्मार्ट-टैप पेलोड तय किया गया है और डिवाइस पर काम करता है
एनएफ़सी/एचसीई
ध्यान दें, उपयोगकर्ता इसे "कोड दिखाएं" पर क्लिक करके बदल सकता है,
घूमते हुए बारकोड/स्टैटिक बारकोड को दिखाएगा.
रोटेटिंग बारकोड: अगर रोटेटिंग बारकोड पेलोड मौजूद है
स्टैटिक बारकोड: अगर बारकोड पेलोड मौजूद है
एक से ज़्यादा रिडेंप्शन पेलोड तय करने से यह पक्का हो सकता है कि सभी उपयोगकर्ताओं को
सुरक्षा से जुड़ी समस्याएं हो सकती हैं. विशेष रूप से,
घूमने वाले बारकोड के लिए फ़ॉलबैक
बार-बार देखे जा सकने वाले बारकोड. स्टैटिक बारकोड फ़ॉलबैक सिर्फ़ वेब व्यू में दिखाया जाएगा
या क्लाइंट पर मौजूद है जो रोटेटिंग बारकोड को सपोर्ट नहीं करता. आज से, हमें उम्मीद है कि
सभी Google Wallet क्लाइंट का इस्तेमाल कर सकते हैं.
फ़्लो सेव करें
Google Wallet API में आपको कई तरह के फ़्लो मिलते हैं, जैसे:
कम समय में या समय से पहले लॉयल्टी क्लास बनाना
अपने JWT में पूरा ऑब्जेक्ट भेजना या पहले ऑब्जेक्ट सहेजने का
फिर अपने JWT में आईडी के आधार पर उनका संदर्भ दे रहे हैं
ऑब्जेक्ट सेव होने के बाद अपडेट करना
सुझाया गया घूमने वाला बारकोड फ़ील्ड, इन सभी फ़्लो के साथ काम करता है,
हालांकि, सुरक्षा को बेहतर बनाने के लिए, हम ये सुझाव देते हैं:
एपीआई की मदद से, object:insert एपीआई का इस्तेमाल करके
Google Wallet सर्वर का इस्तेमाल करें और 'Google Wallet में जोड़ें' बटन को कॉन्फ़िगर करके
अपने JWT में आईडी से खास ऑब्जेक्ट का रेफ़रंस दें. इससे पक्का होता है कि
नतीजे के तौर पर, JWT में घूमने वाले बारकोड की सीक्रेट कुंजी शामिल नहीं होती.
ओटीपी के लिए ऐसी सीक्रेट कुंजी का इस्तेमाल करें जिसमें एक ही पास हो
जब तक कुंजी को अपडेट न किया जाए, तब तक यह माना जाना चाहिए कि वह इतने समय तक मान्य रहेगी
है. हमें उम्मीद है कि इस बटन को इस दौरान किसी भी फ़्रीक्वेंसी पर अपडेट नहीं किया जाएगा
सामान्य कार्रवाई के दौरान.
नीचे दिया गया डायग्राम, अलग-अलग कलाकारों के बीच फ़्लो को दिखाता है
इंटिग्रेशन के लिए:
[null,null,["आखिरी बार 2025-08-29 (UTC) को अपडेट किया गया."],[[["\u003cp\u003eRotating barcodes enhance security by changing periodically, mitigating risks associated with ticket theft or unauthorized resale.\u003c/p\u003e\n"],["\u003cp\u003eThey serve as a fallback for devices lacking NFC capabilities, ensuring accessibility for all users.\u003c/p\u003e\n"],["\u003cp\u003eGoogle Wallet prioritizes redemption methods: Smart Tap, Rotating Barcode, then Static Barcode, with user override option.\u003c/p\u003e\n"],["\u003cp\u003eFor optimal security, utilize the \u003ccode\u003eobject:insert\u003c/code\u003e API to prevent exposing the rotating barcode's secret key in the JWT.\u003c/p\u003e\n"],["\u003cp\u003eRotating barcodes are expected to be supported by all Google Wallet clients.\u003c/p\u003e\n"]]],["Rotating barcodes change periodically (e.g., every minute) and are accepted only when current, mitigating risks like ticket theft. They serve as a backup for devices lacking NFC for Smart Tap. The API uses a `RotatingBarcode` type with parameters like QR code type, value pattern, and TOTP details (algorithm, period, parameters). Multiple redemption methods (Smart Tap, rotating barcode, static barcode) prioritize based on device capabilities. For security, it is suggested to call the 'object:insert' API, use an OTP secret key that is scoped to a single pass, and refer to the specific object by ID in the JWT.\n"],null,["# Rotating Barcodes\n\nIntroduction\n------------\n\n\nRotating barcodes look just like regular barcodes but change periodically,\ntypically every minute, and the terminal/reader is programmed to only accept\nthe most recent one. This security measure reduces the risks associated with\nbarcode screenshotting, in particular ticket theft or unauthorized ticket\nresale. Rotating barcodes can also act as a fallback for devices that can't\ntake advantage of Smart Tap, due to not supporting NFC (lack of hardware, or\nsoftware disabled).\n\n### API reference\n\n\nFor technical details about Rotating Barcodes, see the\n[`RotatingBarcode` type](/wallet/retail/loyalty-cards/rest/v1/RotatingBarcode).\n\n### Example payload\n\n| JSON ||\n|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|\n| ``` { \"rotatingBarcode\": { \"type\": \"QR_CODE\", \"valuePattern\": \"MyRotatingBarcode-{totp_timestamp_seconds}-{totp_value_0}\", \"alternateText\": \"Ticket#: 1234567890\", \"totpDetails\": { \"algorithm\": \"TOTP_SHA1\", \"periodMillis\": \"3000\", \"parameters\": [ { \"key\": \"3132333435363738393031323334353637383930\", \"valueLength\": \"8\" } ] } } } ``` |\n\nFallback Mechanisms\n-------------------\n\n\nOn the user device, only one redemption mechanism is used at a given time,\ndepending on how the pass is configured and on the capabilities of the device.\nIn the order of priority, the following redemption types are used:\n\n1. Smart Tap: If a smart-tap payload is specified and if the device supports NFC/HCE\n - Note, this can be overridden by the user by clicking \"Show code,\" which will force the display of the rotating barcode/static barcode.\n2. Rotating barcode: If a rotating barcode payload is specified\n3. Static barcode: If a barcode payload is specified\n\n\nSpecifying multiple redemption payloads can ensure all users are supported but\nmay have security implications. In particular, using a static barcode as a\nfallback for a rotating barcode negates most of the security benefits of using\nrotating barcodes. A static barcode fallback will only be shown in web views\nor on clients that do not support rotating barcodes. As of today, we expect\nall Google Wallet clients to support rotating barcodes.\n\nSave Flow\n---------\n\nThe Google Wallet API offers several flows, including:\n\n- Creating the loyalty classes at save time, or ahead of time\n- Sending the complete objects in your JWT, or saving the objects ahead of time then referencing them by ID in your JWT\n- Updating the objects after they have been saved\n\n\nThe proposed rotatingBarcode field is compatible with all these flows,\nhowever, in order to improve security, we suggest the following:\n\n- Call the `object:insert` API to insert the pass to the Google Wallet server and configure the Add to Google Wallet button to reference the specific object by ID in your JWT. This ensures that the resulting JWT does not include the secret key of the rotating barcode.\n- Use an OTP secret key that is scoped to a single pass\n- The key, unless it is updated, is expected to be valid for the lifespan of the pass. We do not expect this key to be updated on any frequency during the course of normal operation.\n\n\nThe following sequence diagram illustrates the flow between the various actors\nfor a typical integration:"]]