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:
- Build a Drop-in integration.
- Follow the setup steps in the Google Pay documentation.
- Add Google Pay in your Customer Area.
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:
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 merchant name that appears on the Google Pay payment sheet.
- The Google Pay button appearance.
- Your payment requirements.
- The card types that you accept.
- The payment methods that you support.
- Event handlers to use.
Configure the merchant name rendered in the payment sheet. See MerchantInfo for more details.
configurationobject 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.|
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, log in to a Google account and create a Google Pay wallet with the details of a real card, not a test card. When you make a test payment, the card number is automatically mapped to our test card number starting with 4111, so the real card is not charged.
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.
Before you go live
- 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 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.