Use this integration for processing Google Pay payments through Adyen, when Google agents (Google AI Mode or Gemini) initiate transactions with you. In this integration, Google handles product discovery, checkout session management, and showing the Google Pay payment sheet to the shopper. Your server gets an encrypted payment token from google, and you pass it to Adyen to complete the payment.
Requirements
| Requirement | Description |
|---|---|
| Integration type | An existing online payments integration using Advanced flow. |
| Limitations | This integration is only for Google Pay payments. |
| Setup steps | Before you begin:
|
How it works
The following shows the process of a shopper using a Google AI agent to make a transaction with you:
- The shopper instructs Google's AI agent to initiate a transaction with you.
- Google's AI agent makes a request to your server that handles the Universal Commerce Protocol (UCP) Tokenization flow.
- Your server returns order data to Google's AI agent (like total payment amount and shipping options).
- Google's AI agent shows the order summary to the shopper.
- The shopper selects to pay with Google Pay.
- Google's AI agent shows the payment form, collects the shopper's payment details, and creates an encrypted token that you can use to process the payment through Adyen.
- Google's AI agent makes a request to your server, including the encrypted token.
- Your server makes a payment request to Adyen's server, including the encrypted token.
- Adyen returns the payment result to you.
- You return the payment result to Google's AI agent.
- Google's AI agent shows the order confirmation to the shopper.
- Adyen sends a webhook message with the payment outcome to your webhook server.
Configure your UCP payment handler for Adyen payments
Your server's UCP payment handler handles requests from Google's AI agent. You must configure it to handle tokens for Adyen payments.
In the manifest of the UCP handler, configure the following fields:
| Field | Description |
|---|---|
tokenization_specification.type |
PAYMENT_GATEWAY. This is not a placeholder, this is the exact value. |
tokenization_specification.parameters.gateway |
adyen |
tokenization_specification.parameters.gatewayMerchantId |
Your Adyen merchant account. |
In your manifest file, the merchant_info.merchant_id field meant for your Google Pay Merchant ID. This field is not for your Adyen merchant account.
Process the payment
To process the payment, you must get the encrypted token from the request from Google's AI agent to your server. Then use it to make a payment request from your server to Adyen.
Get the encrypted token
Google makes a POST /checkout-sessions/{id}/complete to your server.
Get the following from the request body:
| Parameter | Description |
|---|---|
payment.instruments.credential.token |
The encrypted token from Google. Do not decode or modify it. Pass the complete value to Adyen. |
Make a payment request to Adyen
To submit the payment, make a payment request to Adyen.
When you make the payment request, additionally include the following for the Google Pay payment initiated by Google's AI agent:
| Parameter | Description |
|---|---|
paymentMethod.type |
googlepay |
paymentMethod.googlePayToken |
The complete token value from the POST /checkout-sessions/{id}/complete request from Google's AI agent. |
After making the payment request, continue your integration's payment flow. You get the payment outcome in your synchronous response and a webhook message.
Liability shift
When using PAYMENT_GATEWAY tokenization with Adyen, Adyen (as the gateway) receives the Electronic Commerce Indicator (ECI) from the Google Pay token and passes it through the payment processing flow automatically. You do not need to handle ECI value.
| Authorization method | Liability shift availability |
|---|---|
CRYPTOGRAM_3DS |
Available for eligible Visa and Mastercard device tokens (Android).
|
PAN_ONLY |
Liability shift is not available for PAN_ONLY transactions. |
Enabling Visa liability shift: To qualify for Visa liability shift for CRYPTOGRAM_3DS transactions, follow Google's instructions to enable Fraud liability protection for Visa device tokens in your Google Pay & Wallet Console. Make sure that totalPrice and currencyCode are always accurate. Transactions with the value zero or a hardcoded value do not qualify.
Test and go live
Set your test environment:
- UCP payment handler configuration: TEST
- Base URL for Adyen test endpoints:
https://checkout-test.adyen.com
Test Google Pay in insolation
To test the Google Pay token flow without a full UCP integration, use the Google Pay Code Generator. Configure the tokenization specification with the gateway adyen and your Adyen merchant account name, generate a test token in the test environment, and make a test /payments request with the token. This lets you validate the Adyen integration end-to-end before your UCP server is complete.
Test wallet setup
Add a card to your Google Pay wallet, then enroll it in Google's test card suite. The suite pre-populates your wallet with Adyen test cards covering authorized, refused, and other scenarios. Alternatively, add a real card in the test environment. It maps to an Adyen test card of the same brand without being charged.
Go live
We recommend that you test the scenarios described in Google Pay’s API reference for web 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 the steps in the Google Pay API request production access.
- Complete the steps in the Google Pay API deploy to production documentation for Web.