为您的 Android 应用授权 Google Wallet 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 发送请求。
如未另行说明,那么本页面中的内容已根据知识共享署名 4.0 许可获得了许可,并且代码示例已根据 Apache 2.0 许可获得了许可。有关详情,请参阅 Google 开发者网站政策。Java 是 Oracle 和/或其关联公司的注册商标。
最后更新时间 (UTC):2025-08-29。
[null,null,["最后更新时间 (UTC):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 by providing these credentials in the Google Wallet console under 'Additional features' > 'App Permissions'.\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."]]