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:
Mock Testing — Test Google Pay card creation using predefined mock payloads without enabling Google Pay Wallet Decryption.
Sandbox Testing — Generate encrypted Google Pay payment tokens in the Google Pay
TESTenvironment and submit them to CMP sandbox.
General Setup
Use the standard Create Card API to submit encrypted Google Pay payment tokens.
Endpoint:
POST /cardsContent-Type:
application/vnd.api+jsonAuthentication: Bearer JWT
Supported protocol:
ECv2Wallet 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: panwallet_type: google_paywallet_details.payment_data_type: PAN_ONLYwallet_details.auth_method: PAN_ONLYwallet_details.message_idNo 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: dpanwallet_type: google_paywallet_details.payment_data_type: 3DSecurewallet_details.auth_method: CRYPTOGRAM_3DSwallet_details.message_idwallet_details.cryptogramECI, 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[].detailerrors[].error_codemeta.observability.trace_idmeta.observability.client_idmeta.observability.vault_idmeta.observability.account_idmeta.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_idfrom 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_ONLYCRYPTOGRAM_3DSBoth 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
Open the merchant's test checkout page.
Select Google Pay and complete the payment flow using an eligible card.
Google Pay returns an encrypted payment token.
Submit the encrypted token to the CMP sandbox Create Card API.
Verify that CMP returns the card details with
auth_method: PAN_ONLYand no cryptogram.
CRYPTOGRAM_3DS testing
Use a compatible Android device with an eligible card provisioned in Google Wallet.
Open the merchant's test checkout page.
Select Google Pay and complete the payment flow.
Submit the encrypted payment token to CMP sandbox.
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_GATEWAYtokenization.Set
gatewaytoverygoodsecurity.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.
Related Documentation
Last updated

