This page explains how to add Google Pay to your existing Drop-in integration.
Requirements
Follow the setup instructions in the Google Pay documentation.
Choose which server-side flow your integration uses:
API reference
Drop-in configuration
Property | Description |
---|---|
googlePayEnvironment |
The environment for Google Pay. Possible values: - test - production |
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.
- 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.
- Go to your live Customer Area to configure your Google Merchant ID.
- 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.