為 Android 應用程式授權 Google 錢包 Android SDK
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
Google Wallet API 提供 Android SDK,方便您整合
透過原生程式碼直接在 Android 應用程式中使用 Google 錢包功能。
如要使用 Google Wallet Android SDK,您必須提供應用程式的套件名稱
Android 應用程式,以及應用程式簽署憑證的 SHA-1 指紋。這些憑證
用於授權應用程式的發布存取權,以及驗證要求
傳送到 Google Wallet API
1. 取得簽署憑證的 SHA-1 指紋
如要取得簽署憑證的 SHA-1 指紋,請按照
Google Play 服務說明文件,瞭解如何透過下列任一做法擷取動態饋給:
簽署憑證的 SHA-1 指紋看起來像這樣:
DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09
2. 在 Google 錢包主控台中授權應用程式
取得 SHA-1 指紋後,請按照下列步驟授權 Android
。
- 前往 Google Pay 和錢包控制台。
- 在左側導覽欄中,按一下 [Google Wallet API]開啟 Google 錢包控制台。
- 按一下 [其他功能]分頁。
- 在「應用程式權限」中方塊中,請點選「+ 新增應用程式」按鈕。
- 輸入應用程式的套件名稱和 SHA-1 指紋。
- 按一下「新增應用程式」。
如果套件名稱和應用程式出現在「應用程式權限」中方塊,您的應用程式已獲得授權
,使用 Google Wallet Android SDK 傳送要求至 Google Wallet API。
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-08-29 (世界標準時間)。
[null,null,["上次更新時間:2025-08-29 (世界標準時間)。"],[[["\u003cp\u003eThe Google Wallet API offers an Android SDK for native app integration of Google Wallet features.\u003c/p\u003e\n"],["\u003cp\u003eYou need your app's package name and SHA-1 fingerprint for authorization and authentication.\u003c/p\u003e\n"],["\u003cp\u003eAuthorize your app in the Google Wallet console by providing your app's package name and SHA-1 fingerprint.\u003c/p\u003e\n"]]],["The Google Wallet Android SDK requires app authorization using the app's package name and SHA-1 fingerprint. Retrieve the fingerprint via `keytool` or Gradle. Then, in the Google Pay & Wallet console, navigate to the 'Google Wallet API' section, and under 'App Permissions,' add your app details, including the package name and the obtained SHA-1 fingerprint. This process authorizes the app to use the Google Wallet API.\n"],null,["# Authorizing your Android app for the Google Wallet Android SDK\n\nThe Google Wallet API provides an Android SDK to make it easier for you to integrate\nGoogle Wallet capabilities directly in your Android apps with native code.\n\nTo use the Google Wallet Android SDK, you must provide the package name of your\nAndroid app, and the SHA-1 fingerprint of your app signing certificate. These credentials\nare used to authorize publishing access for your app, and authenticate requests\nsent by your app to the Google Wallet API.\n\n1. Get the SHA-1 fingerprint of your signing certificate\n--------------------------------------------------------\n\nTo get the SHA-1 fingerprint of your signing certificate, follow the directions in the\nGoogle Play services documentation for retrieving it using either of the following:\n\n- [keytool](/android/guides/client-auth#using_keytool_on_the_certificate)\n- [Gradle](/android/guides/client-auth#using_gradles_signing_report)\n\nThe SHA-1 fingerprint of your signing certificate looks similar to this: \n\n DA:39:A3:EE:5E:6B:4B:0D:32:55:BF:EF:95:60:18:90:AF:D8:07:09\n\n2. Authorize your app in the Google Wallet console\n--------------------------------------------------\n\nOnce you have your SHA-1 fingerprint, do the following to authorize your Android\napp in the Google Wallet console.\n\n1. Go to the [Google Pay \\& Wallet console](https://pay.google.com/business/console/).\n2. In the left nav, click 'Google Wallet API' to open the Google Wallet console.\n3. Click the 'Additional features' tab.\n4. In the 'App Permissions' box, click the '+ Add an app' button.\n5. Enter the package name of your app and your SHA-1 fingerprint.\n6. Click 'Add application'.\n\nIf your package name and app appear in the 'App Permissions' box, your app is authorized\nto send requests to the Google Wallet API using the Google Wallet Android SDK."]]