Google Pay™ Web Component
Google Pay™ lets users pay with their cards stored in their Google account, providing a fast and secure checkout experience. If you provide Google Pay™ as a payment method to your customers, you must use the official Google Pay™ logo and button assets in compliance with Google Pay Web Brand Guidelines, without modifications to the Google Pay™ asset colors, proportions, or appearance.
Note: Google Pay™ is currently only supported in the Hosted Checkout product. Once Google Pay™ is enabled in your JustiFi merchant account dashboard, the Google Pay™ button will automatically appear as a payment option in your hosted checkout flow.
Prerequisites
- Any device compatible, take a look here for a comprehensive list.
- Your application must be served over HTTPS.
Implementation Resources
For detailed implementation guidance, refer to the following Google Pay documentation:
- Google Pay Web Developer Documentation
- Google Pay Web Integration Checklist
- Google Pay Web Brand Guidelines
Processing Google Pay™ Payments with Hosted Checkout
Our hosted checkout integration with Google Pay™ simplifies your ability to provide Google Pay™ as a payment option to your customers. Once you enable Google Pay™ in your JustiFi merchant account dashboard, the Google Pay™ button will automatically appear as a payment option in your hosted checkout. For more information on setting up and using hosted checkout, see our Hosted Checkout documentation.
You must additionally complete the following essential steps to enable Google Pay™ functionality:
Adhere to Google policies: When using our hosted checkout with Google Pay™, merchants must adhere to the Google Pay and Wallet API's Acceptable Use Policy and accept the terms defined in the Google Pay API Terms of Service.
Content Security Policy (CSP) settings: If your application uses Content Security Policy, you may need to update your CSP settings to allow the Google Pay™ SDK to function properly. Ensure your CSP allows connections to Google Pay™ domains and scripts.
Enable Google Pay™ in your account: Ensure that Google Pay™ is enabled in your JustiFi merchant account dashboard. Once enabled, the Google Pay™ button will automatically appear as a payment option in your hosted checkout. Contact your account representative if you need assistance enabling this feature.
For more details on using hosted checkout, see our Hosted Checkout documentation.
Implementation Details
Gateway Configuration
As a supported payment service provider with the Google Pay™ API, our integration lets you as a merchant use Google Pay™ API's gateway integration type, where we handle all of the decryption on your behalf.
When using hosted checkout with Google Pay™, the following values are automatically set in the TokenizationSpecification object. No merchant configuration or code is required — the hosted checkout handles this entirely:
- gateway: Set to
justifiautomatically. - gatewayMerchantId: Set using
{sub_account_id}which is the sub account the checkout is configured to process payments for.
Here is an example of what the hosted checkout passes when initializing the Google Pay™ button:
{
"tokenizationSpecification": {
"type": "PAYMENT_GATEWAY",
"parameters": {
"gateway": "justifi",
"gatewayMerchantId": "acc_m9IjrorZoehPX9BA7kIrn"
}
}
}
Authorization Methods
Google Pay™ provides two different authorization methods: PAN_ONLY and CRYPTOGRAM_3DS. Our hosted checkout integration with Google Pay™ supports both types of card credentials:
-
PAN_ONLY: Physical card details stored in Google Pay™.
- Supported countries: United States
- These are cards manually added to a user's Google account
- Standard fraud detection and authorization checks apply to all PAN_ONLY transactions
-
CRYPTOGRAM_3DS: Tokenized virtual card stored on device.
- Authentication is performed by Google Pay™
- Supported countries: United States
- These are cards tokenized to Android devices with cryptographic verification
- Provides an additional layer of security through device-level authentication
Authentication note: JustiFi does not currently support standalone 3D Secure (3DS) authentication for PAN_ONLY credentials. However, CRYPTOGRAM_3DS transactions include built-in authentication performed by Google Pay™ at the device level. For merchants who require enhanced authentication, we recommend encouraging customers to use device-tokenized cards (CRYPTOGRAM_3DS) when available, as these provide stronger security guarantees through Google Pay™'s native authentication.
Supported Card Networks
We support the following card networks with the Google Pay™ API in hosted checkout. These values are all passed to the allowedCardNetworks property automatically and find the appropriate values in Google Pay's web developer documentation:
- VISA
- Mastercard
- American Express
- Discover
Billing Address Requirements
A billing address is not required for our hosted checkout implementation of Google Pay™.
Handling Google Pay™ Payment Data
When a customer pays with Google Pay™ through hosted checkout, the entire payment data lifecycle is handled automatically by JustiFi. The hosted checkout component:
- Receives the encrypted payment data from Google Pay™
- Extracts the token from the
paymentMethodData.tokenizationData.tokenproperty - Sends the token securely to the JustiFi backend
- Tokenizes the payment data into a JustiFi payment method
- Completes the checkout
No merchant action is required to process or handle the Google Pay™ payment data. The hosted checkout manages the complete flow from customer authorization through checkout completion.
For more information on completing checkouts, see our Checkout API documentation.