> ## Documentation Index
> Fetch the complete documentation index at: https://www.cashfree.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Google Pay

> Integrate Google Pay with Cashfree Payments using Hosted checkout to accept tokenised (CRYPTOGRAM_3DS) and non-tokenised (PAN_ONLY) card payments.

Google Pay lets customers pay using a card stored in their Google Account, without re-entering card details. Cashfree supports Google Pay as a payment method on [Hosted checkout](/docs/payments/online/web/redirect) and the Dynamic Currency Conversion (DCC) screen.

Cashfree supports both Google Pay authentication methods:

* **`CRYPTOGRAM_3DS`** (tokenised): a card tokenised in Google Wallet. Google sends a DPAN (device Primary Account Number) and a one-time cryptogram instead of the raw card number. Cashfree doesn't apply additional 3D Secure (3DS) authentication solely because the payment came from Google Pay.
* **`PAN_ONLY`** (non-tokenised): a card saved to the customer's Google Account. Google sends the card's Primary Account Number (PAN) instead of a device token. Standard Cashfree card 3DS and step-up rules apply.

To enable Google Pay for your account, contact your Cashfree account manager or submit the [support form](https://merchant.cashfree.com/merchants/landing?env=prod\&raise_issue=1).

<Note>
  When you use Google Pay on Hosted checkout, you must adhere to the [Google Pay and Wallet API Acceptable Use Policy](https://payments.developers.google.com/terms/aup) and accept the [Google Pay API Terms of Service](https://payments.developers.google.com/terms/sellertos).
</Note>

## Integrating Google Pay

Cashfree currently offers Google Pay only through Hosted checkout. There's no separate Android or iOS SDK for merchants to integrate, and this requires no additional Google Pay-specific development work from you. If you use `api.cashfree.com`, create an order and redirect to checkout as you do today, and Cashfree processes Google Pay as part of the existing checkout flow.

Hosted checkout offers the following benefits:

* **Minimal development effort**: No Google Pay-specific coding required. You don't load the Google Pay JavaScript library, and you don't send the encrypted Google Pay token to Cashfree yourself.
* **Automatic updates**: New Google Pay features are automatically available.
* **Reduced maintenance**: Cashfree manages certificates, decryption, and compliance.
* **Enhanced security**: All sensitive data is handled by Cashfree's **PCI-compliant** infrastructure.

For Hosted checkout branding and reviewer context, see Google's own references:

* [Google Pay Web developer documentation](https://developers.google.com/pay/api/web/overview)
* [Google Pay Web integration checklist](https://developers.google.com/pay/api/web/guides/test-and-deploy/integration-checklist)
* [Google Pay Web brand guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines)

Follow these steps to implement Google Pay with Hosted checkout:

<Steps>
  <Step title="Create an order">
    Create an order using the [Create Order API](/docs/api-reference/payments/latest/orders/create-order):

    ```bash theme={"dark"}
    curl -X POST 'https://api.cashfree.com/pg/orders' \
      -H 'Content-Type: application/json' \
      -H 'x-api-version: 2026-01-01' \
      -H 'x-client-id: YOUR_CLIENT_ID' \
      -H 'x-client-secret: YOUR_CLIENT_SECRET' \
      -d '{
        "order_id": "order_001",
        "order_amount": 100.00,
        "order_currency": "INR",
        "customer_details": {
          "customer_id": "customer_001",
          "customer_name": "John Doe",
          "customer_email": "john@example.com",
          "customer_phone": "+919876543210"
        }
      }'
    ```
  </Step>

  <Step title="Redirect to checkout">
    Redirect your customers to the checkout URL returned in the order creation response. Google Pay is automatically displayed for eligible users on Hosted checkout and, where applicable, on the DCC screen.
  </Step>
</Steps>

## How it works

A Google Pay payment on Hosted checkout follows these steps:

1. The customer selects Google Pay on Hosted checkout or the DCC screen.
2. The customer confirms the payment in the Google Pay sheet and chooses a saved card.
3. Google returns an encrypted payment token to the page, scoped to Cashfree as the processor. The encrypted payload is in `paymentMethodData.tokenizationData.token`. Merchants using Hosted checkout never receive or forward this token.
4. Cashfree decrypts and validates the token.
5. Cashfree authorises the payment with the card network and issuing bank:
   * For `CRYPTOGRAM_3DS`, Cashfree uses the tokenised card (DPAN) and cryptogram.
   * For `PAN_ONLY`, Cashfree applies the same risk-based 3DS (step-up) criteria used for normal card transactions. The customer may be asked to complete 3DS when those criteria require it.
6. The customer sees the payment result on the same page. No redirect to a separate wallet app is required, except when 3DS is triggered for a `PAN_ONLY` payment.

## Gateway configuration

On Hosted checkout, merchants don't configure Google Pay themselves. Cashfree uses the Google Pay API `PAYMENT_GATEWAY` integration type and decrypts on your behalf, with the following processor configuration:

| Parameter             | Value                            |
| --------------------- | -------------------------------- |
| `gateway`             | `cashfree`                       |
| `gatewayMerchantId`   | `cashfree`                       |
| `allowedAuthMethods`  | `["CRYPTOGRAM_3DS", "PAN_ONLY"]` |
| `allowedCardNetworks` | `VISA`, `MASTERCARD`, `AMEX`     |

`gateway` is the gateway ID registered with Google during Cashfree's technical onboarding. `gatewayMerchantId` is Cashfree's shared Google Pay processor ID. It isn't a per-merchant MID, and you don't need to configure it.

Cashfree uses the following configuration in the Google Pay `TokenizationSpecification` object:

```json theme={"dark"}
"tokenizationSpecification": {
  "type": "PAYMENT_GATEWAY",
  "parameters": {
    "gateway": "cashfree",
    "gatewayMerchantId": "cashfree"
  }
}
```

Hosted checkout doesn't require merchants to request a Google Pay billing address (`billingAddressRequired`). Address collection, where needed (for example, address verification checks on the DCC screen), follows Cashfree's existing checkout fields, not Google Pay `BillingAddressParameters`.

## Supported authentication methods

Cashfree supports both Google Pay authentication methods:

| Authentication method        | Support   | 3DS                                                                               | What it means                                                                                                                                                                         |
| ---------------------------- | --------- | --------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `CRYPTOGRAM_3DS` (tokenised) | Supported | No extra 3DS solely because it's Google Pay. Authentication is in the cryptogram. | A card tokenised in Google Wallet. Cashfree receives a DPAN, a cryptogram, and an optional ECI (Electronic Commerce Indicator), then authorises it as a tokenised card payment.       |
| `PAN_ONLY` (non-tokenised)   | Supported | Yes, the same risk-based 3DS and step-up rules as a normal card.                  | A card saved to the customer's Google Account, not a device token. Cashfree decrypts the PAN and applies the same risk-based 3DS and step-up rules used for normal card transactions. |

Customers can pay with either:

* a card enrolled for tokenised payments in Google Wallet (`CRYPTOGRAM_3DS`), or
* a card saved to their Google Account (`PAN_ONLY`).

### 3D Secure (step-up) for PAN\_ONLY

`PAN_ONLY` payloads aren't treated as already-authenticated device tokens. Cashfree applies its existing criteria to selectively trigger 3DS (step-up authentication) for Google Pay `PAN_ONLY` transactions, based on the same risk rules used for normal card transactions.

* **`CRYPTOGRAM_3DS`**: processed as a tokenised wallet payment using the cryptogram. Cashfree doesn't apply additional 3DS solely because the payment came from Google Pay.
* **`PAN_ONLY`**: processed like a regular card. If Cashfree's risk rules would step up a normal card payment, the same step-up applies here. Merchants don't turn this on separately. It follows the 3DS settings already configured on the Cashfree account for cards.

Merchants using Hosted checkout don't need to implement a separate 3DS integration for Google Pay. Cashfree handles this in the checkout flow.

## Device and browser compatibility

Google Pay is shown automatically for customers using a supported configuration:

* HTTPS checkout.
* A supported browser on desktop, Android, or iOS, with Google Pay available (Chrome, Safari, Firefox, or Edge).
* A Google Account with at least one eligible card:
  * a tokenised card in Google Wallet (`CRYPTOGRAM_3DS`), or
  * a card saved to the Google Account (`PAN_ONLY`).

Tokenised cards (`CRYPTOGRAM_3DS`) are available only in markets and on devices where Google Wallet tokenisation is supported. `PAN_ONLY` can still be offered where a card is saved to the Google Account. Settlement follows the merchant's Cashfree account, typically India for Cashfree PG merchants.

## Testing

Test Google Pay in Cashfree's sandbox the same way as other Hosted checkout methods:

1. Create the order against the sandbox API with sandbox credentials.
2. Open the sandbox Hosted checkout URL returned in the response.
3. Complete Google Pay using a Google Account that has at least one test or eligible card.

Sandbox uses Google Pay's `TEST` environment, and production Hosted checkout uses Google Pay's production environment. You don't pass a Google Pay `environment` field in the Create Order API.

## Security and compliance

### Data protection

Cashfree protects Google Pay transaction data as follows:

* Google returns an encrypted payment token to Cashfree. The merchant never receives the raw PAN, DPAN, or cryptogram.
* Cashfree decrypts and validates the payload centrally. The encrypted token is never exposed to or stored by the merchant.
* For `CRYPTOGRAM_3DS`, Google Pay returns a tokenised card number and cryptogram instead of the raw card number.
* For `PAN_ONLY`, Cashfree decrypts the payload and processes it under the same card security and 3DS controls as a normal card payment.
* All communications use TLS encryption.

### Compliance

Enabling Google Pay has the following compliance implications for your integration:

* Enabling Google Pay on Hosted checkout doesn't add PCI DSS scope to your integration, because Cashfree handles decryption and validation.
* Ensure compliance with local payment regulations applicable to your business, including 3DS and Strong Customer Authentication requirements where they apply. Cashfree applies its existing card 3DS rules to `PAN_ONLY` transactions.
* Using Google Pay on Hosted checkout is subject to the Google Pay Acceptable Use Policy and Terms of Service referenced earlier in this topic.

## Troubleshooting

### Google Pay option not appearing

If Google Pay doesn't appear as a payment option for a customer, check the following:

* Verify the customer's browser and device are supported and Google Pay is set up.
* Confirm the customer has at least one eligible card in their Google Account, either a tokenised Wallet card, a saved card, or both.
* Ensure HTTPS is enabled on your checkout domain.
* Confirm Google Pay is enabled on your Cashfree account.

### Payment failures

The following scenarios cause a Google Pay payment to fail:

| Scenario                                          | What happens                                                                                                 |
| ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------ |
| Token fails signature or decryption validation    | Payment fails immediately; no authorisation request is sent.                                                 |
| Token has expired                                 | Payment fails validation before authorisation.                                                               |
| `PAN_ONLY` payment requires 3DS based on risk     | The customer is asked to complete 3DS, same as a normal card. If they cancel or fail 3DS, the payment fails. |
| Card network or issuer declines the authorisation | Standard decline response, same as any other card payment.                                                   |

## Best practices

* **Progressive enhancement**: Google Pay is shown automatically only to eligible customers. No additional logic is required on your side.
* **Clear labelling**: Hosted checkout uses Google's official Google Pay button assets and [brand guidelines](https://developers.google.com/pay/api/web/guides/brand-guidelines).
* **Error handling**: Provide clear feedback for failed transactions, with a fallback to other payment methods.
* **Receipts**: Show Google Pay as the payment method on success pages and notifications, without printing full card details.

For additional support or questions about Google Pay integration, contact the Cashfree Payments support team through the [support form](https://merchant.cashfree.com/merchants/landing?env=prod\&raise_issue=1) or see the [Payment Gateway API Overview](/docs/api-reference/payments/latest/overview).

<div class="hidden" data-table-of-contents="bottom">
  <p class="mt-4 font-medium flex items-center gap-2 related-docs-heading">
    <svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" aria-hidden="true" class="w-4 h-4">
      <path d="M3 4h7a2 2 0 0 1 2 2v13a2 2 0 0-2-2H3z" />

      <path d="M21 4h-7a2 2 0 0 0-2 2v13 a2 2 0 0 1 2-2h7z" />
    </svg>

    <span>Related topics</span>
  </p>

  <ul>
    <li><a href="/docs/docs/api-reference/payments/latest/orders/create-order">Create Order API</a></li>
    <li><a href="/docs/docs/api-reference/payments/latest/overview">Payment Gateway API Overview</a></li>
  </ul>
</div>
