Overview
This guide shows how a Google AI agent (Google AI Mode or Gemini) transacts over Google's Universal Commerce Protocol (UCP) using the Google Pay payment handler and processes payments on the ACI Worldwide (OPPWA) platform.
The AI Agent (Platform) discovers the merchant's UCP profile, creates a checkout session, obtains a Google Pay token, submits that token as the UCP payment instrument, and the merchant backend charges the payment using ACI Worldwide.
AI Agent → UCP Checkout → Google Pay Token → /checkout-sessions/{id}/complete → ACI /v1/payments → Approved Transaction
Architecture Diagram
The following sequence shows the interactions between the shopper, AI Agent (Platform), merchant, Google Pay, ACI Worldwide (OPPWA), and the acquirer / network.
Step-by-Step Workflow
The AI Agent acquires a Google Pay token during checkout and submits it as the UCP payment instrument. The merchant backend then charges the transaction through ACI Worldwide. 【1-eef7b1】
- The shopper finds and selects a product through the AI Agent (Platform).
-
The AI Agent retrieves the merchant's UCP profile using
GET /.well-known/ucp. -
The merchant returns the accepted payment handlers, including
com.google.pay. - The AI Agent creates a checkout session using the shopper's cart.
- The merchant returns the checkout state together with the Google Pay handler configuration.
- The AI Agent requests payment data from Google Pay.
- Google Pay displays the payment sheet.
- The shopper selects the payment method and authorizes the payment.
- Google Pay returns payment data containing the encrypted payment token.
-
The AI Agent submits the payment instrument using
POST /checkout-sessions/{id}/complete. -
The merchant backend sends a payment request to ACI Worldwide using
POST /v1/payments. - ACI Worldwide decrypts and verifies the token.
- ACI Worldwide submits the authorization / capture request to the acquiring side.
- The acquirer / network returns the payment result.
- ACI Worldwide returns the payment result to the merchant.
- The merchant confirms the order and returns the order ID.
- The AI Agent confirms the successful purchase to the shopper.
Requirements
To follow this integration, accounts and approvals are required on the Google Pay side, the ACI Worldwide side, and the UCP integration side. 【1-eef7b1】
Google Pay
- Google Pay & Wallet Console account.
- Google Pay Merchant ID for the PRODUCTION environment.
- Google Pay API Terms of Service accepted.
- ACI Worldwide confirmed as the selected processor / gateway.
ACI Worldwide Side
- ACI account with an
entityId. - API access token for TEST and PRODUCTION.
- Configuration enabled for
paymentBrand=GOOGLEPAY. - Supported card networks enabled as required.
-
TEST:
https://eu-test.oppwa.com -
PRODUCTION:
https://eu-prod.oppwa.com
UCP / Agent Side
- Merchant UCP profile published at
/.well-known/ucp. - Checkout endpoints including create, update and complete.
- Agent integrating both UCP and Google Pay.
- Server-side backend that submits the payment request to ACI Worldwide.
Configure UCP Handler
Declare the com.google.pay handler in the UCP profile and specify
tokenization_specification pointing to ACI so that Google encrypts the token for the ACI gateway. Return the same declaration in checkout responses. 【1-eef7b1】
The two important parameters that make this work are:
- gateway tells Google to encrypt the token so only ACI can decrypt it.
- gatewayMerchantId identifies your ACI Channel entity ID.
Return this same handler declaration in your UCP checkout responses so the agent uses the correct configuration and the platform enforces the right requirements per session. 【1-eef7b1】
Example UCP payment handler configuration
{
"payment_handlers": {
"com.google.pay": [
{
"config": {
"environment": "TEST",
"merchant_info": {
"merchant_id": "{{GOOGLE_PAY_MERCHANT_ID}}"
},
"allowed_payment_methods": [
{
"tokenization_specification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "aciworldwide",
"gatewayMerchantId": "{{ACI_GATEWAY_ENTITY_ID}}"
}
}
}
]
}
}
]
}
}
Process Payment
Payment processing consists of two major stages:
- The AI Agent obtains the encrypted Google Pay token and submits it through UCP.
- The merchant backend submits the payment request to ACI Worldwide.
Get Encrypted Token from Google
The Google Pay API returns a PaymentData object. The encrypted token is available at
paymentMethodData.tokenizationData.token. Pass this token on without modification. 【1-eef7b1】
Example Google Pay Token Retrieval
paymentsClient.loadPaymentData(paymentDataRequest).then(function(paymentData) {
const googlePayToken =
paymentData.paymentMethodData.tokenizationData.token;
submitToUcpComplete(googlePayToken);
});
Submit Instrument via UCP
The AI Agent maps the token into a UCP payment instrument and calls
POST /checkout-sessions/{id}/complete. 【1-eef7b1】
The merchant receives the encrypted token inside the UCP Payment object. 【1-eef7b1】
Example UCP Complete Request
POST /checkout-sessions/{id}/complete
Send Payment Request to ACI Worldwide
Submit the encrypted token using the standard OPPWA
/v1/payments endpoint with
paymentBrand=GOOGLEPAY. 【1-eef7b1】
Example ACI Payment Request
POST https://eu-test.oppwa.com/v1/payments
entityId={{ACI_ENTITY_ID}}
paymentBrand=GOOGLEPAY
googlePay.paymentToken=<token>
Result Codes
Treat the transaction as successful only when result.code matches an approved pattern. 【1-eef7b1】
| Result Code Pattern | Meaning |
|---|---|
000.000.* |
Successful. |
000.100.1* |
Successfully processed in TEST system. |
000.200.* |
Pending / still open. |
| Other values | Declined or error. |