Google Pay
Last updated: December 14, 2022
Information
3rd party 3DS is not available with our Tokens endpoint. To process via 3DS, please visit our Google Pay with 3D Secure page.
By integrating Google Pay into your website or Android application, your customers can securely make one-touch payments using any credit or debit card connected to their Google account.
Information
To enable Google Pay in the UAE or Saudi Arabia, please request activation from your Account Manager.
To start processing Google Pay payments, you must 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.
Google Pay integration and payments can be simplified into a three-step method:
Information
CRYPTOGRAM_3DS
credentials receive liability shift by default. Applying 3DS for Google Pay enables liability shift for PAN_ONLY
transactions.
Read more about Google Pay liability shift eligibility on our 3D Secure page.
Note
Before going live, you are required to register with Google Pay and select Checkout.com as your payment processor. You must also add your domain to your allowlist. Note that you must be logged in as a Google Developer to do this. If not, you will be redirected to Google Pay's support page.
Information
For information on integrating with Google Pay, first, refer to the Google Pay API guide.
When you submit a payment data request to the Google API, be sure to include the following parameters:
'gateway': 'checkoutltd'
'gatewayMerchantId': '<your public key>'
1{2"type": "CARD",3"parameters": {4"allowedAuthMethods": ["PAN_ONLY", "CRYPTOGRAM_3DS"],5"allowedCardNetworks": ["AMEX", "DISCOVER", "JCB", "MASTERCARD", "VISA"]6},7"tokenizationSpecification": {8"type": "PAYMENT_GATEWAY",9"parameters": {10"gateway": "checkoutltd",11"gatewayMerchantId": "<YOUR_PUBLIC_KEY>"12}13}14}
Information
You will need to specify which card types and card schemes to support in your payment data request.
Once you have received the payment data from Google, you then need to call Checkout.com’s endpoint for tokenizing the encrypted payment data; you can find this payment data in the paymentMethodToken
property of the Google Pay payment data request's response.
To find out more about Google Pay payment requests, read the Google Pay object reference.
Note
Alternatively, if you want to decrypt the Google Pay token yourself and process a payment, follow our pay with a pre-decrypted token guide.
Use the details below to set up your request.
You can find the full list, as well as complete request and response examples, in our API reference.
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": "2018-10-22T15:44:03Z"5}
Now you have the token, it's time to authorize the payment. Take the token, and use it in the body of a card token payment request from your application or website's backend server.
Note
To start testing, you need to create a test account. Google may ask to see your implementation in the sandbox environment before giving you a merchant ID for production.
You can use any real card to simulate payments in a sandbox environment. However, Google also offers test cards, which you can add to your wallet.
When using Google's test environment, if a real card is selected when making the online purchase, Google Pay provides a test card in the encrypted payment data. This ensures that no actual transaction takes place.
Information
Find out more about testing and simulating payments.