Google Pay
Information
Google Pay is available through Flow. Flow enables you to accept payments on your website using Checkout.com's global network of payment methods with a single integration.
Google Pay enables customers to securely perform one-touch payments on your website or Android app, using any credit or debit card connected to their Google account.
Information
To enable Google Pay in the UAE or Saudi Arabia, contact your account manager or request support.
To start processing Google Pay payments, first integrate directly with Google. Once integration is complete, you can add the Google Pay button to your checkout page and start requesting your customers' encrypted payment information.
Follow these steps:
- Integrate with Google Pay.
- Tokenize the Google Pay payment data.
- Request a Google Pay payment.
Follow the integration guide at Google Developers – Google Pay for Payments Overview for:
Before you go live, you must:
- Register with Google Pay & Wallet Console and select Checkout.com as your payment processor.
- Sign in to Google Developer and set up an allowlist for your domain. If you are not signed in, you are redirected to Google Pay's support page.
When you receive the payment data from Google, to tokenize the encrypted payment data call the Request a token endpoint.
The payment data is included in the paymentMethodToken
property of the Google Pay payment data request's response.
To find out more about Google Pay payment requests, see Google Developer – Web object reference.
Note
To process Google Pay transactions, you must authenticate your request using the same public key you provided to the Google API in the tokenizationSpecification.parameters.gatewayMerchantId
field.
post
https://api.checkout.com/tokens
1{2"type": "googlepay",3"token_data": {4"protocolVersion": "ECv1",5"signature": "TJVA95OrM7E2cBab30RMHrHDcEfxjoYZgeFONFh7HgQ",6"signedMessage": "{\"encryptedMessage\": \"ZW5jcnlwdGVkTWVzc2FnZQ==\", \"ephemeralPublicKey\": \"ZXBoZW1lcmFsUHVibGljS2V5\", \"tag\": \"c2lnbmF0dXJl\"}"7}8}
1{2"type": "googlepay",3"token": "tok_ubfj2q76miwundwlk72vxt2i7q",4"expires_on": "2024-10-22T15:44:03Z"5}
The response returns the token, which you need to use in the payment request.
Make a token payment request from your app or website's back-end server.
When you submit a payment data request to the Google API, you must include the following parameters:
'gateway': 'checkoutltd'
'gatewayMerchantId': '<your public key>'
You also need to specify which card types and card schemes to support in the request.
1{2"type": "CARD",3"parameters": {4"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],5"allowedCardNetworks": ["AMEX", "DISCOVER", "MASTERCARD", "VISA"]6},7"tokenizationSpecification": {8"type": "PAYMENT_GATEWAY",9"parameters": {10"gateway": "checkoutltd",11"gatewayMerchantId": "<YOUR_PUBLIC_KEY>"12}13}14}
Google Pay offers the following authentication modes:
PAN_ONLY
– The card is stored on file with your customer's Google account. The payment credentials are not bound to an Android device. For example, desktop or non-Android mobile web.CRYPTOGRAM_3DS
– Google Pay offers SCA compliance by binding payment credentials to an Android device and allowing issuers to delegate the authentication to Google for all subsequent payments on that device.
CRYPTOGRAM_3DS
credentials receive liability shift by default.
To enable liability shift for PAN_ONLY
transactions, apply 3DS.
For how to comply with SCA requirements for PAN_ONLY
scenarios, see Desktop (or when device binding is unavailable).
Google Pay transactions authenticated with 3DS can benefit from liability shift when the cardholder adds their card:
- To Google Chrome or a Google product directly – The card is saved as a Funding Primary Account Number (FPAN) and supports liability shift for payments explicitly authenticated with 3DS.
- To the native Google Pay app using their Android device – The card is saved as a Device Primary Account Number (DPAN) and supports liability shift, because authentication occurred when the card was added.
Card schemes may downgrade a payment's liability shift during the authorization stage, even if the ECI value indicates that the downgrade occurred during authentication. The liability shift outcome is determined after authorization.
Information
To benefit from liability shift for Visa transactions processed using Google Pay, Visa requires you to opt in to Fraud liability protection for Visa device tokens.
When you receive the payment data from Google, request a Checkout.com token to encrypt the payment data.
The response returns a new token_format
that identifies whether or not subsequent payments using this token already meet SCA requirements.
token_format | SCA compliance |
---|---|
| Google handles the authentication and provides a payload that meets the SCA requirements. |
Note
In cases where the Google Pay payment does not require a 3D Secure setup (for example, payments using a CRYPTOGRAM_3DS
token), Checkout.com handles the non-3DS authorization request.
token_format | SCA compliance |
---|---|
| For in-scope transactions, the payment must use a 3D Secure exemption or be processed as 3D Secure. |
1{2"type": "googlepay",3"token": "tok_xac73j6l7rue7freatxtonf3pi",4"expires_on": "2021-09-15T11:14:15Z",5"expiry_month": 12,6"expiry_year": 2026,7"last4": "1111",8"bin": "411111",9"token_format": "pan_only"10}
After receiving your token, you can authenticate the transaction as follows:
- Include the Google Pay token in the payment request body.
- To process this transaction as a 3D Secure payment, set the
3ds.enabled
field totrue
.
1{2"source": {3"type": "token",4"token": "tok_lrn2umaznynuvkcjc6unno663u"5},6"amount": 1234,7"currency": "GBP",8"3ds": {9"enabled": true10}11}
If the card is enrolled in 3D Secure, you receive a 202 Success
response. This response contains a redirect link for your customer.
1{2"id": "pay_hl4k4b5n6pfklmfayflhzw3ovq",3"status": "Pending",4"customer": {5"id": "cus_rtr7qq37wzhujcp5iv36qys43i"6},7"3ds": {8"downgraded": false,9"enrolled": "Y"10},11"_links": {12"self": {13"href": "https://api.sandbox.checkout.com/payments/pay_hl4k4b5n6pfklmfayflhzw3ovq"14},15"redirect": {16"href": "https://3ds2-sandbox.ckotech.co/interceptor/3ds_bicq62vdvrbuznjzcmcfrhtswy"17}18}19}