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

# Direct Integration

With Direct integration, you integrate with the Google Pay™ API on your frontend, obtain the encrypted payment token from Google, and pass it to Yuno's API for processing. This gives you full control over the Google Pay user experience.

**Workflow:** `DIRECT`

<Note>
  Not sure which integration to use? See the [Google Pay overview](/docs/google-pay#integration-options) to compare all three options.
</Note>

## Requirements

Before starting, ensure you meet the [general Google Pay requirements](/docs/google-pay#requirements). Additionally, you need to register with the [Google Pay Business Console](https://pay.google.com/business/console) to obtain a Google merchant ID. Complete the console configuration by following these steps:

1. Complete the **Business Profile**

2. Review the information required in **Google Pay API** > **Integrate with your website**:

   * Your website – This must exactly match the domain of your hosted checkout page (with or without "www")
   * Integration type – **GATEWAY**

3. Screenshots:

* Payment method screen – Your hosted checkout page
* Google Pay API payment screen – The Google Pay payment sheet (shown after clicking the GPay button)
* Post-purchase screen – Transaction confirmation page
* Submit the screenshots, indicate that you have submitted the request, and share the merchantId (BCR)

Use the assigned Merchant ID to configure the Google Pay connection in the Yuno dashboard.

## Integration

To integrate Google Pay with Yuno, follow these steps:

1. In the [Yuno dashboard](https://dashboard.y.uno/), go to the Connections tab. Find Google Pay and click Connect. Enter your credentials in the side panel. Choose a name for the connection and use the merchant ID obtained from the [Google Pay Business Console](https://pay.google.com/business/console) in the Merchant ID field.

<Frame>
  <img src="https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/google-pay-direct-integration/image1.png?fit=max&auto=format&n=MTlogjS0_SlxtlJG&q=85&s=188f4e76c939fad8db16334c2795b6d5" width="800" height="425" data-path="images/reference/google-pay-direct-integration/image1.png" />
</Frame>

2. Create a route in Yuno's dashboard using the processor you want for Google Pay payments. See the [Configure dynamic routing](/docs/routing#configuring-the-dynamic-routing) guide for more information.

Customers will be able to select Google Pay and authorize payments using their familiar Google Pay interface. Yuno then securely handles the payment token received from Google, processing the transaction through your configured payment processor. All Google Pay transactions will be visible and manageable within your Yuno dashboard alongside your other payment methods, providing a unified view of your operations.

## Enable and test Google Pay with Yuno

After integrating, you can enable and test Google Pay with Yuno as follows:

1. Create a Google Wallet Test Account:
   * Visit the [Google Wallet Test Account Sign-In](https://accounts.google.com/InteractiveLogin/signinchooser?continue=https%3A%2F%2Fpay.google.com%2Fbusiness%2Fconsole%2F\&followup=https%3A%2F%2Fpay.google.com%2Fbusiness%2Fconsole%2F\&osid=1\&passive=1209600\&ifkv=AeDOFXjl_LLJZyuykU06uleha4p7uSXJNnLCv_n2jshX6QVJYCy9AKq3K28mIfpgyfS2NDHfimnAFg\&flowName=GlifWebSignIn\&flowEntry=ServiceLogin) page.
   * If you do not have a Google account, create one to proceed.
   * Once signed in, you will be redirected to the Google Wallet business console.
2. Access the Google Wallet API Section:
   * In the Google Wallet business console, navigate to the API management or integration section (usually under developer or integration settings).
3. Select **Create a Pass** to enable **Demo Mode**:
   * In the Google Wallet API section, find the option labeled **Create a Pass**.
   * Click this option to enable **Demo mode**. This allows you to simulate and test pass creation and interactions without real transactions.

<Frame>
  <img src="https://mintcdn.com/yuno-3979e326/MTlogjS0_SlxtlJG/images/reference/google-pay-direct-integration/image2.png?fit=max&auto=format&n=MTlogjS0_SlxtlJG&q=85&s=bb45ccfe570843ec47d7c8b12295f5de" width="1376" height="502" data-path="images/reference/google-pay-direct-integration/image2.png" />
</Frame>

4. Download the [Google Wallet App](https://play.google.com/store/apps/details?id=com.google.android.apps.walletnfcrel\&hl=en\&gl=US) from the Play Store.
5. Go through the payment flow to test the integration.

By following these steps, you can ensure Google Pay is integrated and working as expected before making it available to your customers.

## Go live

After completing all integration steps in the testing environment, request [Google Production Access](https://developers.google.com/pay/api/web/guides/test-and-deploy/request-prod-access) and contact your Technical Account Manager. The Yuno team will help verify your configuration and confirm you are ready to go live.

## Implementation details

Key details for your Google Pay integration with Yuno:

### Google Pay API authorization methods

Yuno supports both Google Pay API authorization methods:

* **`PAN_ONLY`**: Card credentials stored in the user's Google account. When used, Yuno automatically handles 3D Secure authentication if enabled.
* **`CRYPTOGRAM_3DS`**: Device-based card credentials with built-in authentication. These credentials include cryptographic authentication and don't require additional 3DS processing.

Both methods are supported globally across all countries where Yuno operates. On the frontend, include both `PAN_ONLY` and `CRYPTOGRAM_3DS` in your `allowedAuthMethods` array for maximum payment success rates.

* **3D Secure (3DS) for`PAN_ONLY` credentials**: If Google Pay returns a `PAN_ONLY` credential (a card stored in the user's Google account), Yuno will automatically handle the 3D Secure authentication flow if 3DS is enabled. On the frontend, make sure your Google Pay API request includes `PAN_ONLY` in the `allowedAuthMethods` array.
* **Gateway and GatewayMerchantID configuration**: When registering with the [Google Pay Business Console](https://pay.google.com/business/console), ensure that under **Google Pay API** > **Integrate with your website**, the **Integration type** is set to **GATEWAY**. The `Merchant ID` from the Google Pay Business Console is used in the "Merchant ID" field when setting up the Google Pay connection in the Yuno dashboard. Set `gateway` to `yuno` and use your assigned Merchant ID as the `gatewayMerchantId` in your Google Pay API configuration.
* **Authorization methods**: Yuno supports standard authorization methods (purchase, authorization, capture). Availability depends on the payment processor and acquiring bank for each country and payment.
* **Billing address requirements**: If your payment processing requires the customer's billing address (e.g., for AVS checks), configure this in your Google Pay API request. Google provides `BillingAddressParameters` to specify the required detail (e.g., MIN or FULL). See [Google's documentation](https://developers.google.com/pay/api/web/reference/request-objects#BillingAddressParameters). Only request billing address details if necessary, as this can increase checkout friction.
* **Transaction data and payment cryptography**: Merchants integrate Yuno's SDKs (Android, iOS, Web) into their applications. When a customer chooses Google Pay, Yuno's SDK interacts with the Google Pay API and securely receives the encrypted payment data (payment token) from Google. This token is passed from your app to your backend server, which then uses Yuno's server-side APIs to submit the token for payment processing. Yuno handles decryption and processing with the payment processor.

## Pass Google Pay payment token in request

<Warning>
  **Important: ECv2 Protocol Version Required (Android SDK v2.8.0+)**

  Starting from Yuno Android SDK version 2.8.0, only Google Pay's ECv2 (Encrypted Card Version 2) protocol is supported. If your Google Pay integration is configured to use ECv1, payments will not be processed correctly.

  Please ensure your Google Pay API configuration includes `"protocolVersion": "ECv2"` in the tokenization specification. ECv1 has been deprecated by Google and is no longer supported by Yuno's SDK.

  If you are upgrading from a version prior to 2.8.0 or migrating from a custom SDK build, verify that your Google Pay merchant configuration uses ECv2 before processing payments. For guidance on updating your Google Pay configuration, refer to [Google's documentation](https://developers.google.com/pay/api/android/guides/resources/payment-data-cryptography#encrypted-card-version).
</Warning>

When you initiate a transaction with Google Pay, a payment token containing encrypted payment data is returned. Pass the complete token received from Google Pay in the `payment_method.detail.wallet.payment_token` field as a JSON string in your payment request.

### Google Pay wallet response object

The Google Pay SDK returns the following object structure, which must be passed as the complete `payment_token` value:

```json theme={"theme":{"light":"github-dark","dark":"github-dark"}}
{
  "signature": "MEQCIBvkZdkroLuBAj0K0yhqF4RfvkcWM8hW4nInpGnbSbqHAiA4emX0LkHkdnYqIiGgAQ+gF2Md5ac1DIsHItwJfwj9DQ==",
  "intermediateSigningKey": {
    "signedKey": "{\"keyValue\":\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZ8tVNZqE1G6292tV11Ff1Pc1xZDZU9Mj5QSqDaU9hMjaH+CYI7+XL+Cor0X+4r0jICgcZgQkS/q+WzY8Eku1Fg==\",\"keyExpiration\":\"1766083480615\"}",
    "signatures": [
      "MEYCIQC75wFVZ3JkWTZenVvU9WVdWzeKUvTiB2FAGtUjIP6qFgIhAP3nB97NF+2lXsqpflH/livwpy24IPSfWMF7i1pHqrw1"
    ]
  },
  "protocolVersion": "ECv2",
  "signedMessage": "{\n  \"encryptedMessage\": \"Fvw/m1KNUIAXRRd6gbbuH2eWEhARKpQL/WZBJF5GCWE9QTuJf15pJUASEIjooQa36AwbGuSUs5qtm36x/yWe8pGi4w2vNyN+bUcnw4HuxrhrPMD+VoioLwmJenHU7/ypW5wzGfOmaCWn3FQ8GjE59mfFtC+8+LPmt3Z9xcvr/wT4Qm09TNRp3k/4/6JaV2+OTYqeOER6pAvqb7WEEjRLjIapvAYKPE6VXrhIo5zdwGh2VWvxY000nkzEIbn3OKShJ/mT7ITLQF9b5J4caGGRVFBn2oobaO72I8CCpiTAWgsw3GnyQACk9ggqnXOugVWinFDDazcs0q2YF3x6fBjz8sJpODx1dTUPrOacvFzEJ9XPovYooYK3wDiRfrtwqoadG/SYlESoguIuuAx+XOdc1jP+NWy0WDVKIqAJOwsg5qkSvNS2qi3m7SKapX3EVLiw/619l9JpTIRHdiIIeOu5BtFYL86o4yb0plrE8/ivvQ2/7U4ISGxzaJ4o6PFk7RZ96nWafdT0m30JlxMmTOI6iUOtsw02SVtinwS+83xcN3s6XRAPWRjJ0d1kaUd/4kHbPy8S/UKNBjanytDwDzn6wEccluisI4E=\",\n  \"ephemeralPublicKey\": \"BPUzeogQZAp0N4D3vLYrvQ7Hc+fc261ZW17LIoMnIAgcWaANAhM39Z8mDCYxpiNIO/F0WtOkJhcvVZFSnI/yq/w=\",\n  \"tag\": \"owzrWByO1bNLbw9m/G2kzGmWDnBCs7QoMN+N0zovZAo=\"\n}"
}
```

### Request example

```json theme={"theme":{"light":"github-dark","dark":"github-dark"}}
{
  "account_id": "d34257e7-55d4-44cf-8b90-3a5152bbe020",
  "description": "Google Pay test",
  "merchant_order_id": "MER01",
  "country": "US",
  "amount": {
    "currency": "USD",
    "value": 1
  },
  "customer_payer": {
    "email": "testing@y.uno"
  },
  "workflow": "DIRECT",
  "payment_method": {
    "detail": {
      "wallet": {
        "payment_token": "{\"signature\":\"MEQCIBvkZdkroLuBAj0K0yhqF4RfvkcWM8hW4nInpGnbSbqHAiA4emX0LkHkdnYqIiGgAQ+gF2Md5ac1DIsHItwJfwj9DQ\\u003d\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEZ8tVNZqE1G6292tV11Ff1Pc1xZDZU9Mj5QSqDaU9hMjaH+CYI7+XL+Cor0X+4r0jICgcZgQkS/q+WzY8Eku1Fg\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1766083480615\\\"}\",\"signatures\":[\"MEYCIQC75wFVZ3JkWTZenVvU9WVdWzeKUvTiB2FAGtUjIP6qFgIhAP3nB97NF+2lXsqpflH/livwpy24IPSfWMF7i1pHqrw1\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"Fvw/m1KNUIAXRRd6gbbuH2eWEhARKpQL/WZBJF5GCWE9QTuJf15pJUASEIjooQa36AwbGuSUs5qtm36x/yWe8pGi4w2vNyN+bUcnw4HuxrhrPMD+VoioLwmJenHU7/ypW5wzGfOmaCWn3FQ8GjE59mfFtC+8+LPmt3Z9xcvr/wT4Qm09TNRp3k/4/6JaV2+OTYqeOER6pAvqb7WEEjRLjIapvAYKPE6VXrhIo5zdwGh2VWvxY000nkzEIbn3OKShJ/mT7ITLQF9b5J4caGGRVFBn2oobaO72I8CCpiTAWgsw3GnyQACk9ggqnXOugVWinFDDazcs0q2YF3x6fBjz8sJpODx1dTUPrOacvFzEJ9XPovYooYK3wDiRfrtwqoadG/SYlESoguIuuAx+XOdc1jP+NWy0WDVKIqAJOwsg5qkSvNS2qi3m7SKapX3EVLiw/619l9JpTIRHdiIIeOu5BtFYL86o4yb0plrE8/ivvQ2/7U4ISGxzaJ4o6PFk7RZ96nWafdT0m30JlxMmTOI6iUOtsw02SVtinwS+83xcN3s6XRAPWRjJ0d1kaUd/4kHbPy8S/UKNBjanytDwDzn6wEccluisI4E\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BPUzeogQZAp0N4D3vLYrvQ7Hc+fc261ZW17LIoMnIAgcWaANAhM39Z8mDCYxpiNIO/F0WtOkJhcvVZFSnI/yq/w\\\\u003d\\\",\\\"tag\\\":\\\"owzrWByO1bNLbw9m/G2kzGmWDnBCs7QoMN+N0zovZAo\\\\u003d\\\"}\"}"
      }
    },
    "type": "GOOGLE_PAY"
  }
}
```

## Related documentation

* [Google Pay overview](/docs/google-pay)
* [Google Pay SDK integration](/docs/google-pay-sdk-integration)
* [Google Pay via provider](/docs/integration-via-provider-google-pay)
* [Google Pay with PIX](/docs/google-pay-with-pix)
