You can use the following collection of code samples to integrate the Google Pay API. For more information about the integration, see step-by-step tutorial.
Samples
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2025-08-14 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-14 UTC."],[[["\u003cp\u003eThis page provides code samples for integrating the Google Pay API into Android, Flutter, and React Native applications.\u003c/p\u003e\n"],["\u003cp\u003eThe samples cover basic integration, triggering payments from notifications, Jetpack Compose integration, UI testing, and using Kotlin coroutines.\u003c/p\u003e\n"],["\u003cp\u003eDevelopers can find links to code repositories for each sample, including Kotlin and Java implementations.\u003c/p\u003e\n"],["\u003cp\u003eFor a detailed integration guide, refer to the provided step-by-step tutorial link.\u003c/p\u003e\n"]]],["The provided resources demonstrate integrating the Google Pay API in various contexts. Core actions include basic API integration for Android, initiating payments from notifications, and utilizing the Jetpack Compose UI element. Additionally, there are examples of end-to-end UI testing and using Kotlin coroutines for asynchronous calls. Multiple coding languages are exemplified, such as Java, Flutter, and React Native. Each example includes a corresponding GitHub repository for practical implementation.\n"],null,["You can use the following collection of code samples to integrate the Google Pay API. For more information about the integration, see [step-by-step tutorial](/pay/api/android/guides/tutorial). \n\n| Title | Description | Links |\n|-------------------------|---------------------------------------------------------------------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| Basic integration | A basic integration of the Google Pay API on Android. | [](https://github.com/google-pay/android-quickstart/tree/main/kotlin) [](https://github.com/google-pay/android-quickstart/tree/main/java \"Java\") [](https://github.com/google-pay/flutter-plugin/tree/main/pay/example \"Flutter\") [](https://github.com/google-pay/react-native-make-payment/tree/main/example \"React Native\") |\n| Pay from a notification | A sample application that triggers Google Pay from a notification. | [](https://github.com/google-pay/android-quickstart/tree/notifications/kotlin) [](https://github.com/google-pay/android-quickstart/tree/notifications/java \"Java\") |\n| Jetpack Compose | An integration with the Jetpack Compose UI element of the Google Pay button. | [](https://github.com/google-pay/android-quickstart/tree/compose/kotlin) |\n| End-to-end UI testing | An application that uses UI testing libraries to test Google Pay. | [](https://github.com/google-pay/android-quickstart/tree/test_cards_uiautomator/kotlin) [](https://github.com/google-pay/android-quickstart/tree/test_cards_uiautomator/java \"Java\") |\n| Kotlin coroutines | An integration of the Google Pay API that uses coroutines to make asynchronous calls. | [](https://github.com/google-pay/android-quickstart/tree/coroutines/kotlin) |"]]