On this page, you can find additional configuration for adding Google Pay to your Drop-in integration.
When shoppers select Google Pay, Drop-in 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, Drop-in also handles redirecting shoppers to another website to complete the verification.
Before you begin
Before starting your Google Pay integration:
You don't need to send additional fields for Google Pay. To see optional fields that you can send for all payment methods, choose the endpoint you integrated:
- /sessions: This is the default with Drop-in v5.0.0 or later.
- /payments: If you implemented an additional use case.
following script in your checkout page:
Select which endpoint you're integrating:
This is the default with Drop-in v5.0.0 or later.
There's no additional configuration you need to include for Google Pay.
This optional configuration parameter is only accepted on the
Instant payment button configuration
instantPaymentTypes object to display the Google Pay payment button at the top of the list of available payment methods. The sample below shows how to do this:
Optional Google Pay configuration
You can configure the following:
Configure the merchant name rendered in the payment sheet. See MerchantInfo for more details.
Values you set in the
configuration object will override any Google Pay configuration from your back end.
||The merchant name you want displayed in the payment sheet. If specified, you must also specify
||The name of your Adyen merchant or company account. Required if
||Your Google Merchant ID. Required if
||Your signed JSON Web Token (JWT). This allows you to use your Google merchant ID with multiple domains. If specified, you must also provide
To be able to use the JSON Web Token, your account must be approved by Google. Ask your Google contact if your business qualifies.
||The domain of the merchant where the request comes from. Required when using
Configure the Google Pay button. See ButtonOptions for more details.
||The type of button you want displayed on your payments form.|
||The color of the button you want displayed on the payment form.|
||The language on the button. Defaults to the
Supported from Web Components v4.1.0.
||Specifies whether the button changes to fill the size of its container (the default), or has a static width and height.
Supported from Web Components v4.1.0.
Configure your payment requirements. See PaymentDataRequest for more details.
||Set this to true if you want to collect the shopper's email address.|
||Set to true to request the shopper's full shipping address.|
||Set any shipping restrictions.|
||Set to true if you want to present shipping options in the payment sheet.|
||Set shipping options and a default shipping option to be shown in the payment sheet.|
Configure accepted card types. See Card Parameters for more details.
||Specify supported authentication methods. Default value is
||Specify allowed card networks. The allowed networks are automatically configured based on your account settings, but you can override this here.|
||Default is true. Set this to false if you don't support credit cards.|
||Default is true. Set this to false if you don't support prepaid cards.|
||Set this to true if you require a billing address.|
||The expected fields returned if
Payment method support
Specify which payment methods are supported. See IsReadyToPayRequest for more details.
||Default is true.|
The following event handlers are supported for Google Pay.
||Called when the shopper clicks the Google Pay button. Call
||Called after the shopper approves the payment on the Google Pay form. The first parameter (
||Called after the shopper approves the payment on the Google Pay form. Contains the full response from Google Pay. Use this if you need additional data such as the shipping address or the shopper email.|
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:
- Log in to a Google account and create a Google Pay wallet.
- Enrol your wallet in the Google Pay test card suite
- 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
PaymentDataRequestobject, 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 setup for Web.
Before you go live
We recommend that you test the scenarios described in Google Pay’s API reference for web in your live environment.
- 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.
- Go to your live Customer Area to configure your Google Merchant ID.
- Complete the steps in the Google Pay API request production access.
- Complete the steps in the Google Pay API deploy to production documentation for Web.
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.