Search

Are you looking for test card numbers?

Would you like to contact support?

Classic-integration icon

Google Pay for Checkout SDKs

Learn how to accept Google Pay payments using our Checkout SDKs.

This page explains the integration steps for an old integration. If you are using our Checkout SDKs, we recommend that you move your integration to Drop-in. If you are already using the new integration with the /payments endpoint, refer to our new Google Pay documentation instead.

Google Pay is a payment method that allows shoppers to make purchases using the card stored in their Google account. This provides them with a simpler checkout process whether they are buying from their Android devices, on the web, or in-store through POS terminals.

For more information on Google Pay availability, see Countries where you can use Google Pay and the list of Supported browsers.

Payment Type Payment flow Recurring Refunds Partial Refunds Captures Partial Captures Chargebacks
Wallet Direct Yes Yes Yes Yes Yes Yes

You can accept Google Pay payments with:

Prerequisites

Before you start with your Google Pay implementation, make sure that you:

  1. Read and understand our Android SDK, or Components integration guides.
  2. If you have built your own UI for Android, read the Google Pay API Setup and Tutorials documentation for Web or Android.

Integrate with Android SDK

If you are using our drop-in Android Checkout SDK, there is no need for additional configuration.

If you have built your own UI for Android, you need to generate the Google Pay token then submit it to Adyen to complete the payment.

  1. Generate Google Pay token. Follow the Google Pay documentation to integrate your Android application. Set adyen as your gateway and provide your merchant or company account name in the gatewayMerchantId parameter.

    tokenizationSpecification.put(
          "parameters",
          new JSONObject()
              .put("gateway", "adyen")
              .put("gatewayMerchantId", "YourCompanyOrMerchantAccountName"));

    Get the token from Google Pay API response PaymentData object.

  2. Include the Google Pay token when you submit the payment.

    GooglePayDetails googlePayDetails = new GooglePayDetails.Builder(<YOUR_TOKEN_HERE>).build();
    mPaymentHandler.initiatePayment(googlePayPaymentMethod, googlePayDetails);

Google Pay notifications

Our notifications are webhooks informing you of important events related to your account. Accepting notifications is required for Google Pay. In most cases, the resultCode you receive from the /payments endpoint or the /payments/details endpoint (for 3D Secure redirects) already indicates whether the payment was authorised. In other cases, we can only inform you of the outcome of a payment by means of a notification. You'll need to rely on notifications when:

  • The resultCode is Pending or Received.
  • You didn't receive a resultCode, for example because the shopper failed to return to your website or app after completing the payment.

You'll receive the outcome of a payment in a notification with:

  • eventCode: AUTHORISATION.
  • pspReference: Adyen's unique reference associated with the payment request.
  • success: Indicates the outcome of the payment. Possible values:

    • true: The payment was authorised.
    • false: The payment failed.

AUTHORISATION is just one of the events that trigger a notification. Refer to Notification webhooks to accept notifications and learn about their structure and content.

Testing Google Pay payments

To test Google Pay, you must:

  • Login to a real Google account.
  • Create a Google Pay wallet with valid card details. Google Pay does not accept test cards.

You can check the status of a Google Pay test payment in your Customer Area > Transactions > Payments.

For more information, see Google Pay's test environment setup for Web or for Android.

Go live checklist

Start accepting live Google Pay payments once you have performed the following:

Google Pay will be available in production mode if:

  • The shopper is logged in to their Google account.
  • The shopper has at least one valid payment method on their Google Pay account.

See also