No momento, esta página não está disponível em português
Payment-method icon

Google Pay Component integration

Add Google Pay to an existing Components integration.

This page explains how to add Google Pay to your existing Components integration.

Requirements

Follow the setup instructions in the Google Pay documentation.

Select the server-side flow that your integration uses:

API reference

Components configuration

Property Description
googlePayEnvironment The environment for Google Pay.
Possible values:
- test
- production

Create a configuration object for the Google Pay Component and pass the configuration for Google Pay to it.

Optional configuration

You can include the following parameters in the configuration object:

Parameter Description
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.
merchantInfo The merchant name that shows on the payment form. For more information, refer to Google Pay API documentation on MerchantInfo for more details.
totalPriceStatus The status of the total price. Possible values:
- finalPrice: 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.
notCurrentlyKnown: the total price is not known.
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:
- panOnly: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.
-cryptogram3DS: associated with cards stored as Android device tokens. Returned payment data includes a 3D Secure cryptogram generated on the device.
allowPrepaidCards Set to true to allow prepaid cards.
allowCreditCards Set to true to allow credit cards.
assuranceDetailsRequired Set to true to require
emailRequired Set to true to require email.
existingPaymentMethodRequired Set to true to only show the payment button if a shopper can pay with a supported payment method.
shippingAddressRequired Set to true to require the shipping address.
shippingAddressParameters Set any shipping restrictions.
billingAddressRequired Set to true to require the billing address.
billingAddressParameters The expected fields returned if billingAddressRequired is set to true. For more information on the available fields, refer Google Pay API documentation on billingAddressParameters.

You can refer to the GooglePayConfiguration class in Github.

Test and go live

To start testing Google Pay, log in to a Google account and create a Google Pay wallet.

There are two approaches to using this wallet for testing:

You can check the status of a Google Pay test payment in your Customer Area > Transactions > Payments, whether you used a card from the test card suite or or not. Remember that cards outside the test card suite are mapped to an Adyen test card of the same brand.

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 that 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.

    See also