Google Pay allows customers to make secure payments without manually entering card details. It is supported on Android devices and Chrome browsers, providing a seamless checkout experience. Merchants can integrate Google Pay in an H2H setup, where they transmit payment data directly from Google Pay API responses to Solidgate for processing.
Google Pay tokens contain encrypted card information stored within a customer’s digital wallet and let you securely pass your customers’ data to process payments. The approach to decrypting these tokens depends on whether merchants are PCI DSS-compliant or not. If PCI DSS-compliant, they can handle the token decryption and pass raw card details to Solidgate.
Let Solidgate handle decryption
Solidgate can handle the token decryption if you are not PCI DSS-compliant. Once a payment is initiated, your application or website receives a Google Pay token, which you must include in the Google Pay API payment request.
For this to work, you need:
- Integration with Solidgate
- Integration with Google:
- Web Reference application
- Android Reference application
- Google Pay & Wallet Console Reference for Google Pay Merchant ID
Payment flow
- The customer initiates a payment by clicking the Google Pay button on the checkout page.
- The merchant invokes the Google Pay API button, and Google handles the customer authorization.
- If authorization is successful and the customer confirms the payment, Google Pay provides the merchant with an encrypted payment token.
- The merchant sends the encrypted payment data to Solidgate via the Google Pay API, ensuring the
gatewayMerchantIdparameter contains the public API key of the channel used for Google Pay button initialization and specifyingis_decryptedfalse or excluding theis_decryptedparameter. - Solidgate decrypts the payment token and processes the transaction securely.
For further information about payment parameters, refer to the Google Pay API method.
Handle decryption on your side
If you are PCI DSS-compliant, you can decrypt Google Pay tokens on your side. For that, it is needed to:
- Have a Google Pay merchant ID Reference
- Have a H2H integration
- Follow Google’s guidelines to decrypt the token
To decrypt Google Pay tokens, take the steps described on the Google developer portal Reference . This involves using a cryptographic key and ensuring that sensitive data is securely processed.
Payment flow
- Retrieve the Google root signing keys.
- Confirm that the signature of the intermediate signing key is valid using any unexpired root signing key.
- Ensure the intermediate signing key for the payload is valid and not expired.
- Verify the signature of the payload using the intermediate signing key.
- Decrypt the contents of the payload after validating the signature.
- Check that the message is not expired by comparing the current time to the
messageExpirationfield in the decrypted contents. - Send the payment data to Solidgate via the
Google Pay
API
by specifying
is_decryptedtrue .
The use of is_decrypted
true
implies that the data sent is decrypted and this parameter defines the required fields in the request.
If is_decrypted
true
, the request must:
- include the
decrypted_dataobject - specify either
ECv1
or
ECv2
for
protocolVersion, which determines parameter validation indecrypted_data - specify
typeauth and:force3ds: true , false , or null ifpaymentMethod:CARD (ECv1) orauthMethod:PAN_ONLY (ECv2)force3ds: false or null ifpaymentMethod:TOKENIZED_CARD (ECv1) orauthMethod:CRYPTOGRAM_3DS (ECv2)- highly recommended to provide with
paymentMethod:TOKENIZED_CARD the3dsEciIndicatorvalue for better transaction success rate
- exclude
signatureandsignedMessage
Example with protocolVersion:
ECv1
and paymentMethod:
CARD
:
{
"is_decrypted": true,
"decrypted_data": {
"gatewayMerchantId": "your-public-api-key",
"messageExpiration": "1507738377032",
"messageId": "AH2EjtcHYs1Ye-ZIZuZXd7eNO4QjQfZjBDtP2ti0tob_a5o22lHmGWHsBVYrrSylkFC3ZTsRdvMadQpwOGCIl7XxhTKcfElmgF7UFbcI8CeUZCWRmbTH5s7h69Baqr4FAM735VNThPiP",
"paymentMethod": "CARD",
"paymentMethodDetails": {
"pan": "4895370012003478",
"expirationMonth": "12",
"expirationYear": 2028
}
},
"protocolVersion": "ECv1"
}