Payment-method icon

Google Pay Component integration

Add Google Pay to an existing Components integration.

On this page, you can find additional configuration for adding Google Pay to your Component integration.

When shoppers select Google Pay, Component presents the Google Pay payment sheet where shoppers choose a card they want to use. If shoppers select a card that requires 3D Secure authentication, Component also handles redirecting shoppers to another website to complete the verification.

Before you begin

Before starting your Google Pay integration:

  • Build a Component integration.
  • Follow the setup steps in the Google Pay documentation.
  • Add Google Pay in your Customer Area.
  • API reference

    You don't need to send additional fields for Google Pay. See the /payments endpoint API reference for the optional fields you can send.

    Component configuration

    Pass state to your Checkout activity onActivityResult:

    Optional configuration

    You can optionally include the following properties when you configure AdyenCheckout:

    Property Description Default
    merchantAccount Your Google Merchant ID. This can be anything for testing. Before you go live, get your Google Merchant ID from the Google Pay & Wallet Console. The corresponding merchant ID value from the brands array in the /paymentMethods response.
    allowedCardNetworks The list of supported card networks that you support. -
    allowedAuthMethods The list of fields that are supported to authenticate a card transaction. Possible values:
    - PAN_ONLY:associated with payment cards stored on file with the user's Google Account. Returned payment data includes personal account number (PAN) with the expiration month and the expiration year.
    -CRYPTOGRAM_3DS: associated with cards stored as Android device tokens. Returned payment data includes a 3D Secure cryptogram generated on the device.
    totalPriceStatus The status of the total price. Possible values:
    - FINAL: the total price shown to the shopper doesn't change.
    - ESTIMATED: the total price can change based on the details of the response, such as sales tax based on the billing address.
    allowPrepaidCards Set to false to turn off support for prepaid cards. true: prepaid cards from supported card networks are supported.
    billingAddressRequired Set to true to require the shopper to enter their full billing address. Only request this if it is required to process a transaction. false
    emailRequired Set to true to require the shopper to enter their email address. false
    shippingAddressRequired Set to true to require the shopper to enter their shipping address. false
    existingPaymentMethodRequired Set to true to only show the payment button if a shopper can pay with a supported payment method.
    The value that says if the shopper can pay with each allowed payment method comes from the IsReadyToPayResponse.paymentMethodPresent object.
    googlePayEnvironment The environment for Google Pay. Possible values:
    - WalletConstants.ENVIRONMENT_TEST for test.
    - WalletConstants.ENVIRONMENT_TEST for live.
    The corresponding environment to the environment you set when configuring AdyenCheckout.

    Recurring payments

    To make recurring Google Pay payments, you first need to create a shopper token and then make subsequent recurring transactions with the token.
    Refer to Tokenization for more information and detailed instructions.

    Test and go live

    To test Google Pay in the test environment:

    1. Log in to a Google account and create a Google Pay wallet.
    2. Enrol your wallet in the Google Pay test card suite
    3. Add the details for a real card to the wallet.

    After you make a test payment, you can check the status of a Google Pay test payment in your Customer Area > Transactions > Payments.

    When you test with a real card, it will be masked to one of our test cards, and your card will not be charged. In your Customer Area, your test transactions show test card details of the same brand.

    Limitations apply when testing Google Pay:

    • When testing with a wallet enrolled in the Google test card suite, you cannot test changes to your configuration in the PaymentDataRequest object, because the Google Pay API always returns the same output.
    • When using Google's test cards, only full PAN tokens (FPANs) are returned for test payments, instead of device authenticated tokens, known as Cryptograms.
    • To test 3D Secure 2, you can only use American Express or Discover cards, which trigger 3D Secure 2 challenge flows in the test environment. You cannot use any other card brands or any of Google Pay's test cards.

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

    Before you go live

    We recommend that you test the scenarios described in Google Pay’s API reference for Android in your live environment.

    1. Make sure your API credential has the API Clientside Encryption Payments role. Check this in your live Customer Area or ask your Admin user to verify.
    2. Go to your live Customer Area to configure your Google Merchant ID.
    3. Complete all the steps in the Google Pay API deploy to production documentation for Android.

    In the live environment, note that Google Pay will only be available if:

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