For the complete documentation index, see llms.txt. This page is also available as Markdown.

Google Pay Decrypt

Google Pay Wallet Decryption Testing Guide

This guide explains how to test Google Pay Wallet Decryption in CMP, including both DPAN (CRYPTOGRAM_3DS) and PAN (PAN_ONLY) transactions.

You can test Google Pay Wallet Decryption using:

  1. Mock Testing — Test Google Pay card creation using predefined mock payloads without enabling Google Pay Wallet Decryption.

  2. Sandbox Testing — Generate encrypted Google Pay payment tokens in the Google Pay TEST environment and submit them to CMP sandbox.

General Setup

Use the standard Create Card API to submit encrypted Google Pay payment tokens.

  • Endpoint: POST /cards

  • Content-Type: application/vnd.api+json

  • Authentication: Bearer JWT

  • Supported protocol: ECv2

  • Wallet type: google_pay

The encrypted Google Pay payload must be provided under data.attributes.encrypted_payment_data.

After creating a card, use the Get Card API to retrieve the stored card details.

Mock Testing

Mock testing allows merchants to validate the Google Pay Create Card API integration without generating an actual Google Pay payment token.

Google Pay Wallet Decryption does not need to be enabled on the CMP account for mock testing.

However, a CMP sandbox account and valid service account credentials are required.

Mock Testing — PAN_ONLY

Use the predefined Google Pay PAN_ONLY mock payload to simulate creating a card from an encrypted Google Pay funding PAN.

The mock request uses the following signature:

GOOGLE_PAY/FPAN/4VEn0bzlhTscArIT3Gvbq2MKiZlHAlZc76kAUx=

Example Request:

The request must include the complete predefined mock payload, including intermediateSigningKey and signedMessage.

Expected Response

A successful PAN_ONLY mock request returns card details with:

  • token_type: pan

  • wallet_type: google_pay

  • wallet_details.payment_data_type: PAN_ONLY

  • wallet_details.auth_method: PAN_ONLY

  • wallet_details.message_id

  • No cryptogram

For the current CMP response format, PAN_ONLY cards use token_type: pan.

Example Response

The following example shows selected fields from data.attributes:

No cryptogram is returned for PAN_ONLY transactions.

Mock Testing — CRYPTOGRAM_3DS

Use the predefined Google Pay CRYPTOGRAM_3DS mock payload to simulate creating a card from an encrypted Google Pay DPAN.

The mock request uses the following signature:

GOOGLE_PAY/DPAN/7KmQ2xRtNbVcPlZw5YdJhGfEs3TaUoI9nBvCqM=

Example Request

The request must include the corresponding predefined mock payload, including intermediateSigningKey and signedMessage.

Expected Response

A successful CRYPTOGRAM_3DS mock request returns card details with:

  • token_type: dpan

  • wallet_type: google_pay

  • wallet_details.payment_data_type: 3DSecure

  • wallet_details.auth_method: CRYPTOGRAM_3DS

  • wallet_details.message_id

  • wallet_details.cryptogram

  • ECI, when applicable

Example Response

The following example shows selected fields from data.attributes:

The cryptogram type and ECI depend on the card network and payment data.

Important: Mock payloads are intended for testing the CMP integration. They are not valid Google Pay payment tokens and must not be used for production transactions.

Mock Testing — Error Response

Use the following encrypted Google Pay payload to simulate a 4xx error response.

The mock request uses the following signature:

GOOGLE_PAY/FPAN/R1BheURlY3J5cHRpb25FcnJvclRlc3RLZXk9

Expected Error Mock Response

A failed mock request returns an error response with:

  • errors[].detail

  • errors[].error_code

  • meta.observability.trace_id

  • meta.observability.client_id

  • meta.observability.vault_id

  • meta.observability.account_id

  • meta.observability.fingerprint

Example response - 422

Retrieve Card — GET /cards/{id}

After a successful mock or sandbox Create Card request, merchants can retrieve the stored card using the Get Card API.

The response includes the stored card details and applicable Google Pay wallet metadata.

Duplicate Card Behavior

When Allow Duplicate Cards is disabled, submitting multiple encrypted Google Pay requests for the same card returns the existing card object with HTTP 200.

However:

  • The Create Card response includes the wallet details from the current decryption request.

  • The Get Card response returns the stored wallet details, which may include a message_id from a previous request.

  • The cryptogram and its ECI are not stored or returned by the Get Card API.

Important: For DPAN transactions, merchants must use the cryptogram returned in the current Create Card response for the corresponding payment authorization.

Sandbox Testing

Sandbox testing allows merchants to validate the complete Google Pay integration using encrypted payment tokens generated through the Google Pay API.

Prerequisites

Before testing Google Pay Wallet Decryption in sandbox:

  • Google Pay Wallet Decryption must be enabled for the CMP sandbox account.

  • VGS must provide the merchant with a unique gatewayMerchantId.

  • The merchant must integrate the Google Pay API into a test checkout page.

  • A supported browser and Google account are required.

  • For DPAN testing, a compatible Android device with an eligible card in Google Wallet may be required.

VGS manages the Google Pay encryption keys, so merchants do not need to generate or upload decryption keys.

Step 1: Configure Google Pay in TEST Mode

Follow the Google Pay API Tutorial to configure Google Pay in the TEST environment.

Configure PAYMENT_GATEWAY tokenization using the parameters provided by VGS.

The gatewayMerchantId is generated and provided by VGS. It is different from the VGS Organization ID and the Google-issued Merchant ID.

A Google-issued production Merchant ID is not required for sandbox testing.

Step 2: Test PAN_ONLY and CRYPTOGRAM_3DS

Configure the Google Pay allowedAuthMethods parameter to support:

  • PAN_ONLY

  • CRYPTOGRAM_3DS

  • Both authentication methods

To test each method individually, merchants can configure only the authentication method they want to validate.

Refer to Google Pay API Request Objects for additional information.

PAN_ONLY testing

  1. Open the merchant's test checkout page.

  2. Select Google Pay and complete the payment flow using an eligible card.

  3. Google Pay returns an encrypted payment token.

  4. Submit the encrypted token to the CMP sandbox Create Card API.

  5. Verify that CMP returns the card details with auth_method: PAN_ONLY and no cryptogram.

CRYPTOGRAM_3DS testing

  1. Use a compatible Android device with an eligible card provisioned in Google Wallet.

  2. Open the merchant's test checkout page.

  3. Select Google Pay and complete the payment flow.

  4. Submit the encrypted payment token to CMP sandbox.

  5. Verify that CMP returns the DPAN card details, including the cryptogram and ECI when applicable.

DPAN availability depends on the device, card, issuer, and network.

Step 3: Submit the Encrypted Payment Token to CMP

Google Pay returns the encrypted payment token in:

paymentMethodData.tokenizationData.token

The merchant backend must submit the token's ECv2 fields to CMP under data.attributes.encrypted_payment_data.

Refer to Create Card - Google Pay Wallet Decryption for the complete Create Card request structure.

CMP validates and decrypts the payment token using the configured VGS-managed gateway keys.

Step 4: Validate the Create Card Response

Verify the following fields for each authentication method:

Field

PAN_ONLY

CRYPTOGRAM_3DS

wallet_type

google_pay

google_pay

token_type

pan

dpan

wallet_details.payment_data_type

PAN_ONLY

3DSecure

wallet_details.auth_method

PAN_ONLY

CRYPTOGRAM_3DS

wallet_details.message_id

Returned

Returned

wallet_details.cryptogram

Not returned

Returned

ECI

Not returned

Returned when available

The clear PAN is returned only to clients with the required PCI card-read permissions. Otherwise, use the PAN alias.

Step 5: Retrieve the Card

Call GET /cards/{id} using the card ID returned by the Create Card API.

Verify that the card and applicable wallet metadata are available.

For DPAN transactions, the original single-use cryptogram and ECI are not returned by GET.

Google Pay Test Cards

Google provides a Test Card Suite for testing Google Pay integrations.

However, not all Google Pay test cards produce gateway-decryptable payment tokens. Merchants should use an eligible end-to-end Google Pay setup when validating actual VGS decryption.

Production Testing

Production testing validates Google Pay Wallet Decryption using real payment credentials.

Before testing in production, the merchant must complete Google's production registration and approval requirements.

Prerequisites

1. Register with Google Pay

Create a merchant profile in the Google Pay & Wallet Console.

2. Register the Production Website

Register the production website, provide the required checkout information and screenshots, and submit the integration for Google's approval.

Refer to Google Pay — Publish Your Integration for additional details.

3. Obtain the Google Merchant ID

Google provides a merchantId that must be used in the production Google Pay configuration.

4. Enable VGS Production

Ensure that Google Pay Wallet Decryption is enabled for the CMP production account and that VGS has provided the production gatewayMerchantId.

The Google-issued merchantId and VGS-generated gatewayMerchantId are different identifiers.

Step 1: Configure Google Pay in PRODUCTION Mode

Update the Google Pay integration to use the PRODUCTION environment.

  • Use the Google-issued merchantInfo.merchantId.

  • Continue using PAYMENT_GATEWAY tokenization.

  • Set gateway to verygoodsecurity.

  • Use the VGS-generated production gatewayMerchantId.

Step 2: Generate a Production Google Pay Token

Open the approved production checkout page and complete a Google Pay payment using an eligible payment card.

Google Pay returns the encrypted production ECv2 payment token.

Step 3: Submit the Token to CMP

Send the encrypted token to the CMP production Create Card API.

CMP validates and decrypts the token and creates or returns the corresponding card.

Step 4: Validate the Response and Payment Authorization

Confirm that:

  • CMP successfully decrypts the Google Pay payment token.

  • The expected PAN or DPAN details are returned.

  • The cryptogram and ECI are included for applicable DPAN transactions.

  • The payment processor successfully authorizes the transaction using the required payment details.

  • The single-use cryptogram is not reused for subsequent transactions.

Refer to the Google Pay Integration Checklist for additional production validation requirements.

Note: Production testing uses real payment credentials and may result in actual charges. Merchants should perform controlled live transactions before making Google Pay available to customers.

Troubleshooting

Issue

What to Verify

Google Pay payment sheet does not display an eligible card

Device, browser, issuer eligibility, supported networks, and authentication methods.

Google Pay gateway configuration fails

Confirm gateway: verygoodsecurity and the VGS-generated gatewayMerchantId.

CMP rejects the encrypted token

Check the ECv2 fields, signatures, token expiration, and account configuration.

Google Pay Wallet Decryption is unavailable

Confirm that the feature is enabled for the correct CMP environment.

Cryptogram is missing for PAN_ONLY

Expected behavior. PAN_ONLY does not return a cryptogram.

Cryptogram is missing from GET Card

Expected behavior. Cryptograms are returned during card creation only.

Clear PAN is missing

Confirm the caller has the required PCI card-read permissions.

Last updated