Technical architecture of Google Pay inside Gateway checkout
Gateway checkout (hosted or iframe) is responsible for:
The merchant site does not call the Google Pay API directly.
const button = paymentsClient.createButton({
onClick: onGooglePayClicked
});
The Google Pay button is shown only when all conditions are met:
Google Pay availability depends on eligibility conditions including device, browser, merchant configuration, region, and Google Pay support.
The Gateway frontend evaluates these conditions and shows or hides the button accordingly.
Each checkout session passes the following parameters to the Gateway frontend:
TEST / PRODUCTION20VISA, MASTERCARDPAN_ONLY, CRYPTOGRAM_3DSbillmateEach checkout session passes the following parameters to the Gateway frontend:
{
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "billmate",
"gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"
}
}{
"apiVersion": 2,
"apiVersionMinor": 0,
"allowedPaymentMethods": [{
"type": "CARD",
"parameters": {
"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],
"allowedCardNetworks": ["VISA", "MASTERCARD"]
},
"tokenizationSpecification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "billmate",
"gatewayMerchantId": "YOUR_GATEWAY_MERCHANT_ID"
}
}
}],
"merchantInfo": {
"merchantId": "YOUR_GOOGLE_MERCHANT_ID",
"merchantName": "Merchant Name"
}
}
const paymentsClient = new google.payments.api.PaymentsClient({
environment: 'TEST'
});paymentsClient.isReadyToPay(request)Gateway frontend initializes the Google Pay API client when the checkout page loads. The button is added to the Gateway checkout UI if eligibility checks pass.
Gateway frontend initializes the Google Pay API client when the checkout page loads. The button is added to the Gateway checkout UI if eligibility checks pass.
loadPaymentData() with a configured PaymentDataRequest.PaymentData object to the Gateway frontend.Gateway frontend sends the PaymentData payload to Gateway backend via a secure call. The payload contains an encrypted payment token.
The Gateway securely processes payment data according to its payment model and Google Pay requirements. The merchant does not access raw payment data.
The merchant does not handle or access raw payment data.
After token processing, Gateway backend submits payment data to the acquirer or downstream processor. Routing rules determine which provider receives the transaction.
Routing configuration is managed by Gateway. Contact the Gateway integration team for details specific to your setup.
loadPaymentData() fails — log the error and show a generic payment failure message.Gateway logs transaction events and errors. Raw card data and payment tokens are never logged. Logging scope is limited to data permitted under PCI DSS requirements.
TESTPRODUCTIONIntegration is considered complete when: