개요
컬렉션을 사용해 정리하기
내 환경설정을 기준으로 콘텐츠를 저장하고 분류하세요.
Google Wallet Pass API를 사용하면 파트너가 결제 수단을 통해
회전 중
바코드를 Google 월렛으로 전송합니다. 이 바코드는 짧은 시간 동안만 유효하므로
추가 보안 기능을 제공하여 바코드 스크린샷의 위험을 줄일 수 있습니다. 이
기기에 따라 생성된 바코드가
RFC 6238:
보안 비밀 키 하지만 파트너가 바코드를 직접 생성하려는 경우 Google은
바코드를 Google에 일괄 업로드할 수 있는 API 이 바코드는
사용자의 IP 주소를 이 케이블은 회전 바코드처럼 작동합니다.
표시됩니다. Google에서는 이 솔루션을 파트너 생성 솔루션이라고 부릅니다.
회전 바코드.
파트너 생성 회전 바코드 API
파트너가 생성한 회전 바코드가 동일한 RotatingBarcode를 사용하여 생성됩니다.
객체를 지정합니다. 유형만 필수적이지만 작은 시작 조건을 만드는 것도 좋습니다.
하나 이상의 바코드 세트 (약 10분 분량)를 보내고
initialRotatingBarcodeValues
파트너는
항상 사용자에게 유효한 바코드가 준비되고 initialRotatingBarcodeValues
는 이를 통해
후속 일괄 업로드 호출을 비동기식으로 처리합니다.
rotatingBarcode {
initialRotatingBarcodeValues: object (RotatingBarcodeValues),
type: enum (BarcodeType),
}
필드 |
설명 |
initialRotatingBarcodeValues |
object (RotatingBarcodeValues)
바코드에서 인코딩할 값입니다. 값을 하나 이상 입력해야 합니다. 이러한 초기
바코드는 사용자가 패스를 처음 획득한 시점과
다음 일괄 업로드가 호출될 때 생성됩니다.
|
type |
enum (BarcodeType)
필수 항목입니다. 이 바코드의 유형입니다.
사용 가능한 값:
|
RotatingBarcodeValues
필드 |
설명 |
startDateTime |
string
첫 번째 바코드가 유효한 날짜/시간입니다. 바코드가 스캔된
periodMillis 사용.
오프셋이 포함된 ISO 8601 확장 형식 날짜/시간입니다.
|
values[] |
string
바코드에서 인코딩할 값입니다. 값을 하나 이상 입력해야 합니다.
값의 개수에는 제한이 없지만 요청 본문의 크기는
5MB를 초과할 수 없습니다.
|
periodMillis |
number
각 바코드가 유효한 시간입니다.
|
바코드 값 일괄 업데이트
RotatingBarcode 객체가 생성되면 하루 동안의
100%의 바코드를 매일 스캔합니다. 이 작업은
다음 REST API 엔드포인트를 가져옵니다.
메서드: transitobject.uploadrotatingbarcodevalues
지정된 객체 ID로 참조되는 대중교통 객체에 순환 바코드 값을 업로드합니다.
HTTP 요청
POST
https://walletobjects.googleapis.com/upload/walletobjects/v1/transitObject/{resourc
eId}/uploadRotatingBarcodeValues
경로 매개변수
매개변수 |
설명 |
resourceId |
string
객체의 고유 식별자입니다.
|
요청 본문
요청 본문 (5MB를 초과할 수 없음)에는
RotatingBarcodeValues입니다.
메서드: transitobject.downloadrotatingbarcodevalues
지정된 객체에서 참조한 대중교통 객체의 순환 바코드 값을 다운로드합니다.
있습니다. 이는 파트너가 최신 배치를 확인하려는 경우에 유용합니다.
HTTP 요청
GET
https://walletobjects.googleapis.com/walletobjects/v1/transitObject/{resourceId}/do
wnloadRotatingBarcodeValues?alt=media
경로 매개변수
매개변수 |
설명 |
resourceId |
string
객체의 고유 식별자입니다.
|
대체 메커니즘
다른 방식으로 유효한 RotatingBarcode에 표시할 유효한 바코드가 없는 경우(
업로드되지 않았거나 현재 바코드가 모두 사용된 경우)
사용자에게 표시됩니다.
달리 명시되지 않는 한 이 페이지의 콘텐츠에는 Creative Commons Attribution 4.0 라이선스에 따라 라이선스가 부여되며, 코드 샘플에는 Apache 2.0 라이선스에 따라 라이선스가 부여됩니다. 자세한 내용은 Google Developers 사이트 정책을 참조하세요. 자바는 Oracle 및/또는 Oracle 계열사의 등록 상표입니다.
최종 업데이트: 2025-07-25(UTC)
[null,null,["최종 업데이트: 2025-07-25(UTC)"],[[["\u003cp\u003eGoogle Wallet now supports Partner-Generated Rotating Barcodes for enhanced security, allowing partners to generate and upload time-limited barcodes directly.\u003c/p\u003e\n"],["\u003cp\u003ePartners can integrate Rotating Barcodes using the \u003ccode\u003erotatingBarcode\u003c/code\u003e object within the Google Wallet Passes API, specifying the barcode type and initial values.\u003c/p\u003e\n"],["\u003cp\u003eThe API provides methods for batch uploading (\u003ccode\u003etransitobject.uploadrotatingbarcodevalues\u003c/code\u003e) and downloading (\u003ccode\u003etransitobject.downloadrotatingbarcodevalues\u003c/code\u003e) barcode values for ongoing updates.\u003c/p\u003e\n"],["\u003cp\u003eTo ensure continuous barcode availability, it is recommended to upload a day's worth of barcodes daily until a user's pass expires, utilizing the \u003ccode\u003einitialRotatingBarcodeValues\u003c/code\u003e for a smooth initial experience.\u003c/p\u003e\n"],["\u003cp\u003eIf a Rotating Barcode lacks valid values, an error message will be displayed to the user, highlighting the importance of timely barcode updates.\u003c/p\u003e\n"]]],["The Google Wallet Passes API enables partners to use Partner-Generated Rotating Barcodes, enhancing security by having barcodes valid for a short time. Partners can define a `RotatingBarcode` object specifying the barcode `type` and `initialRotatingBarcodeValues`. They then batch upload barcode values using the `transitobject.uploadrotatingbarcodevalues` API endpoint and should upload a day's worth of barcodes each day. Barcode values can be downloaded via `transitobject.downloadrotatingbarcodevalues` for verification. If no valid barcodes are available, an error message is shown.\n"],null,["# Overview\n\nThe Google Wallet Passes API provides the ability for partners to save\n[Rotating\nBarcodes](/wallet/tickets/transit-passes/qr-code/resources/rotating-barcodes) to the Google Wallet. These barcodes are only valid for a short period of time,\nproviding additional security to reduce the risk of barcode screenshotting. The\nbarcodes are generated on device in accordance with\n[RFC 6238](https://www.rfc-editor.org/rfc/rfc6238), with the partner providing the\nsecret key. However, if a partner would rather generate the barcodes themselves, Google provides\nan API such that barcodes can be batch uploaded to Google. These barcodes will then\nbe passed through to users' phones, where they will act just like Rotating Barcodes,\ndisplaying for a short period of time. We refer to this solution as Partner-Generated\nRotating Barcodes.\n\nPartner-Generated Rotating Barcode API\n--------------------------------------\n\nPartner-Generated Rotating Barcodes are created using the same RotatingBarcode\nobject. Only the type is required, although we also recommend creating a small, starter\nset of barcodes (\\~10 minutes worth), and sending them in\n`initialRotatingBarcodeValues`. The partner is responsible for ensuring that there is\nalways a valid barcode ready for the user, and `initialRotatingBarcodeValues` allows\nthe subsequent batch upload call to be asynchronous. \n\n```gdscript\n rotatingBarcode {\n initialRotatingBarcodeValues: object (RotatingBarcodeValues),\n type: enum (BarcodeType),\n }\n```\n\n| Field | Description |\n|--------------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `initialRotatingBarcodeValues` | `object (`[RotatingBarcodeValues](#RotatingBarcodeValues)`)` The values to encode in the barcode. At least one value is required. These initial barcodes are meant to bridge the gap between when the user first acquires their pass, and when the subsequent batch upload call is made. |\n| `type` | `enum (`[BarcodeType](/wallet/tickets/transit-passes/qr-code/rest/v1/BarcodeType)`)` Required. The type of this barcode. Acceptable values are: - `QR_CODE` - `PDF_417` \u003cbr /\u003e |\n\nRotatingBarcodeValues\n\n| Field | Description |\n|-----------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `startDateTime` | `string` The date/time the first barcode is valid from. Barcodes will be rotated through using `periodMillis`. This is an ISO 8601 extended format date/time, with an offset. |\n| `values[]` | `string` The values to encode in the barcode. At least one value is required. There is no maximum number of values, but note that the size of the request body cannot exceed 5MB. |\n| `periodMillis` | `number` The amount of time each barcode is valid for. |\n\nBatch updating barcode values\n-----------------------------\n\nAfter the RotatingBarcode object has been created, we recommend uploading a day's\nworth of barcodes, every day, until the user's pass expires. This can be done with the\nfollowing REST API endpoint.\n\n### Method: transitobject.uploadrotatingbarcodevalues\n\nUploads rotating barcode values to the transit object referenced by the given object ID.\n\n#### HTTP request\n\n`POST\nhttps://walletobjects.googleapis.com/upload/walletobjects/v1/transitObject/{resourc\neId}/uploadRotatingBarcodeValues`\n\n#### Path parameters\n\n| Parameter | Description |\n|--------------|-----------------------------------------------|\n| `resourceId` | `string` The unique identifier for an object. |\n\n#### Request body\n\nThe request body (which cannot exceed 5MB) contains an instance of\n[RotatingBarcodeValues](#RotatingBarcodeValues).\n\n### Method: transitobject.downloadrotatingbarcodevalues\n\nDownloads rotating barcode values for the transit object referenced by the given object\nID. This is useful if partners want to verify the latest batch.\n\n#### HTTP request\n\n`GET\nhttps://walletobjects.googleapis.com/walletobjects/v1/transitObject/{resourceId}/do\nwnloadRotatingBarcodeValues?alt=media`\n\n#### Path parameters\n\n| Parameter | Description |\n|--------------|-----------------------------------------------|\n| `resourceId` | `string` The unique identifier for an object. |\n\nFallback mechanisms\n-------------------\n\nNote that if an otherwise-valid RotatingBarcode has no valid barcodes to display (they haven't been uploaded yet, or all the current barcodes have been used), an error message will be shown to the user."]]