Overview

Diagram showing the flow of obtaining
    payment information from Google Pay and sending it then to a processor through
    a backend application.
Figure 1. Android payment flow

The Google Pay API enables fast checkout within your app, and gives you convenient access to hundreds of millions of cards saved to Google Accounts worldwide.

How it works

When a user taps the Google Pay payment button, they see a payment sheet that displays the payment methods saved to their Google Account, as well as optional fields such as a shipping address field. Users can quickly select a payment method, add an optional shipping address, or add new information.

The payment flow is as follows:

  1. The user taps the Google Pay payment button and sees a payment sheet with a list of supported payment methods.
  2. The user selects a payment method and Google Pay securely returns a payment token for that method to your app.
  3. Your app submits the payment token, along with details about the purchase, to its backend.
  4. To execute the payment, the backend processes the purchase and sends the payment token to the payment service provider.

Get started

Perform the following steps to get started with the Google Pay API:

  1. Review and adhere to our Google Pay API Terms of Service and Acceptable Use Policy.
  2. Look through the supported processors and gateways list to find the reference documentation for your payment processor or gateway.

  3. Review and adhere to the Google Pay brand guidelines.
  4. Complete a vanilla Android integration using the tutorial in the documentation, or check out the libraries to add Google Pay to your Flutter or React Native application.
  5. Review the integration checklist to assess production readiness for your integration.
  6. Request production access to the Google Pay API using the Google Pay & Wallet Console.
  7. Ensure that your Android device has the latest available version of Google Play services installed.

Resources

Use the following resources to complete your integration:

Codelabs

The following codelabs will help you get started on Web with the Google Pay API:

Videos

Updated December 6, 2024

Are you struggling with Google Pay integration errors on Android? This video offers practical tips and techniques to identify, understand, and resolve these errors, to improve your integration experience. Learn how to get your integrations ready and start collecting payments with Google Pay more quickly.

    Google PayAndroid

    Updated December 6, 2024

    Learn essential tips and clarifications for successfully implementing recurring transactions using Google Pay. This comprehensive guide will walk you through the process, covering the correlations between Merchant Initiated Transactions (MITs) and Customer Initiated Transactions (CITs), to ensure smooth and efficient integrations for your payment system.

      Google PayAndroidWeb

      Updated September 30, 2024

      Ever wondered how you can deliver a seamless, streamlined checkout process by remembering the last payment method used for future checkouts? Luckily, Google Pay's PayButton API is the right tool needed for this solution.

        Google PayAndroid

        Updated July 22, 2024

        This video provides a step-by-step guide on how to test your Google Pay integration. It includes instructions on how to set up a test environment, generate a test payment token, and test your integration with the token.

          Google PayAndroidWeb

          Updated May 6, 2024

          This video provides a step-by-step guide on how to collect payments on Android using Google Pay and Stripe's React Native SDK. It includes instructions on how to set up a test environment, generate a test payment token, and test your integration with the token.

            Google PayAndroid

            Updated November 29, 2023

            This video provides a step-by-step guide on how to collect payments on Android using Google Pay and PayPal Braintree. It includes instructions on how to set up a test environment, generate a test payment token, and test your integration with the token.

              Google PayAndroid

              Blog posts

              Updated October 8, 2024

              Google Pay is a simple and secure way to collect payments from your customers. This blog post explains how to configure your payment options to make the checkout process as seamless as possible for your customers.

                Google PayAndroidWeb

                Updated May 28, 2024

                Google Pay is a simple and secure way to collect payments from your customers. This blog post explains what's new in Google Pay at I/O 2024, including the new Google Pay button, the new Google Pay API, and the new Google Pay API for Web.

                  Google PayAndroidWeb

                  Updated February 14, 2024

                  Google Pay is a simple and secure way to collect payments from your customers. This blog post explains how Google Pay can help you to enable liability shift for eligible Visa device token transactions globally.

                    Google PayAndroidWeb