-
To use the Google Pay API, your Android app must be distributed through the Google Play Store and built with a
minSdkVersionof 21 or higher and acompileSdkVersionof 34 or higher. -
Before integrating, ensure you have the Google Wallet app installed, add a payment method, and comply with the Google Pay API Acceptable Use Policy and Google Play Developer Policy.
-
Implement payments using Google Play In-app Billing if Google processes payments for you or if you sell digital goods.
-
Integrate the Google Pay API by adding the necessary dependency to your app's Gradle build file and enabling it in your
AndroidManifest.xmlfile. -
To go live, consult the publishing guide for essential information after completing the integration process.
Before you begin
To prepare your app, complete the steps in the following sections.
App prerequisites
To use the Google Pay API on Android, your app must be:
- Distributed through the Google Play store.
- Built using the following configuration:
- A
minSdkVersionof23or higher - A
compileSdkVersionof34or higher
Set up your app and your Google Pay account
- Install the Google Wallet app and add a payment method.
- Adhere to our Google Pay API Acceptable Use Policy and the Google Play developer policy.
If either of the following criteria apply to you, use Google Play In-app Billing to implement a payment button in your app:
- Google processes payments for you.
- You sell digital goods, such as movies or games.
Configure your app
To configure your app, complete the steps in the following sections.
App dependencies
Add the Google Play services
dependency for the Google Pay API to your module's Gradle build file
(typically app/build.gradle or app/build.gradle.kts):
Groovy
dependencies { implementation 'com.google.android.gms:play-services-wallet:20.0.0' }
Kotlin
dependencies { implementation("com.google.android.gms:play-services-wallet:20.0.0") }
When you're ready to go live, refer to Publish your integration for important information.