Google Pay™
Learn how to integrate Google Pay™ into your checkout journey.
Overview
Google Pay™ is a digital wallet platform that empowers customers to make online purchases securely without the need to enter their card details for each payment. This payment method is available across all devices (mobile and desktop), irrespective of the operating system and web browser.
When the cardholder selects to pay by Google Pay in-app or on the web, Google Pay displays a payment sheet where they can select which card they want to use and confirm the purchase. For more information, check out this video series on how Google Pay works.
Google Pay supports liability shift for Discover, Mastercard and Visa cards that have been issued in the EU or the UK. American Express, JCB or Visa cards that are issued outside of the EU or the UK are not supported. In order to get the liability shift for these transactions when using Google Pay, you need to authenticate the transaction with 3-D Secure.
Google Pay supports two card authentication methods:
PAN_ONLY - associated with payment cards stored on file that may require 3-D Secure to
comply with SCA requirements.
CRYPTOGRAM_3DS - associated with cards stored as Android device tokens - this method is SCA compliant and does not require 3-D Secure to be processed.
You can either enable both of these methods or just CRYPTOGRAM_3DS (view the guide here). The PAN_ONLY method requires additional 3DS parameters, for more information view our guide here.
Note
If you are enabling Google Pay just on mobile, you can configure CRYPTOGRAM only. If you are setting up Google Pay for desktop, you are required to enable the PAN_ONLY method.
Integrate with Google Pay
See the Google Pay API documentation for a detailed resource of how to integrate Google Pay into your application.
Google Pay (on web)
To set up Google Pay on your website, checkout the links below:
Google Pay (in app)
To set up Google Pay on your Android app, checkout the links below:
Process a Google Pay payment
Once you’ve successfully integrated your web application with Google Pay and are able to send the returned payload to your server, then you’re capable of submitting Google Pay transactions to Acquired.com via our API.
Note
In order to process Google Pay transactions, you are required to sign up for a business account in the Google Console.
Step 1: Encrypted payload
At the end of the Google Pay process an encrypted payload will be returned to your application. An example of this can be found below:
{"apiVersionMinor":0,"apiVersion":2,"paymentMethodData":{"description":"Visa%u2006%u2022%u2022%u2022%u2022%u20061111","tokenizationData":{"type":"PAYMENT_GATEWAY","token":"{\"signature\":\"MEQCIEzQUUkhKfSNmtQn7yw3VmnZNNF8xYkKvhUS1O1aGRbPAiBQ6uDUh9rFGv92RX1+zbOAzY1QcAkzaGliIuc+vmQG1g\\u003d\\u003d\",\"intermediateSigningKey\":{\"signedKey\":\"{\\\"keyValue\\\":\\\"MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEn1O+Iev10IvDndJ6naCWcGc/XCacYXL3ZTrDar9OS9taA2/ZAzJa+WUkqSZUcFDMdHTK4lbmebn3MeyYdoFQJw\\\\u003d\\\\u003d\\\",\\\"keyExpiration\\\":\\\"1621529256367\\\"}\",\"signatures\":[\"MEYCIQCnrV3uzf90iWDvMYIrzVk7FliPcj+P57mUKDZ9D3Zc1AIhAJD5P7QBl8LOtSVkjjjq+3SY4o3AcpbkDqXJQuXfs1tg\"]},\"protocolVersion\":\"ECv2\",\"signedMessage\":\"{\\\"encryptedMessage\\\":\\\"k/zi37h/ZPZ49kKuaod7hcP6AQFb5edMYln9leNtQdRkmUZoIoOIEYMqoc0VmMxkCdhs21GzuZ0UYvZaelPFcjNzpYyBPGqHZhD52WX8nO107VQ27tXtc6+7bAD7XzgMl/1U8cPw2l+LbNzuVKwGcY7cfrxMRx32KXnjsz/S5igNkPaE6kuYjPp/zsMFHJte8t5W4hhZrrY1OM3Rt1JExqQrBQCPJPfZNh9EuAyA4s+7edka5YCQx8gBZr5iIWcCz8HkBiF/c+MwjwuAoBmuYbTVK2k+JX523Owa1L/44Zhz7PBB/iS4ptc/j9A0Qc1Gh7GDb5psTCNq1AUi56TyL/Ckh/KAn3SJ2W9D7aqDpXYKTX2DQil2p/kT2536TtSQI2tbqAk1gWOb20R4A1Gy6o1Q49eIq9QUQhylTIXoXt7fHEq5zGerrRrCXYbhzaD1LFaywJrYqDi82LnpEiQG10Iln8iIaTRXSGJicLIPZfVtK81cI9nIh/+HgBu3hItuU44lMRtmw5a+0hxOCq0bDiMQhQlX4zCKgZEPGzc7aSg+s3fNatR66U54TWW6WvkcDhA\\\\u003d\\\",\\\"ephemeralPublicKey\\\":\\\"BP4lqDq/9e24uPcRG3qleyaY//Fr4StEuoBf8wDE7/9MFtsAXTqut8jT61DqYS3HFN49lrp4f9GHdEoRAyio81E\\\\u003d\\\",\\\"tag\\\":\\\"SWZfba8mk1qGBmvpHylgQxzBWhBgw5xGTt7vZnvVWqg\\\\u003d\\\"}\"}"},"type":"CARD","info":{"cardNetwork":"VISA","cardDetails":"1111"}}}
To simplify the integration process, base64 this entire JSON string. You can then pass through to us in the token
field and we will decrypt.
Step 2: token
field
token
fieldUsing the Acquired.com API in the same way as a card payment, submit the base64 encoded string value through to us in the token
field of your request.
{
"transaction": {
"order_id": "1f1f2a61-5b68-4725-a0ce-9560514ec00b",
"amount": 15.02,
"currency": "gbp",
"capture": true
},
"payment": {
"token": "{{token}}",
"scheme": "visa",
"type": "debit",
"display_name": "**** 4242",
"create_card": false,
"reference": "Custom Ref 001"
},
"customer": {
"customer_id": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
}
}
Note
If you want to process your card authorisation request including AVS data, you will need to request
BillingAddressParameters
in your Google Pay API request. The minimum option will return enough data for a postcode check only. To validate the address you will need to send the full details - see here.
Step 3: Response
You will then receive either a successful or error response.
201 response:
{
"transaction_id": "a7e3fde5-5b83-44f4-9915-782bc7121717",
"status": "success",
"reason": "",
"issuer_response_code": "00",
"check": {
"avs_line1": "matched",
"avs_postcode": "matched",
"cvv": "matched"
},
"links": [
{
"rel": "self",
"href": "/v1/transactions/a7e3fde5-5b83-44f4-9915-782bc7121717"
}
]
}
400 response:
{
"status": "error",
"error_type": "validation",
"title": "Your request parameters did not pass our validation.",
"instance": "/v1/payments/google-pay",
"invalid_parameters": [
{
"parameter": "payment.token",
"reason": "must be base64 encoded json"
}
]
}
Google Pay Recurring
Google Pay Recurring is a feature within Google Pay that enables users to establish automatic and recurring payments for various services. Users can connect their credit or debit card to their Google Pay account, granting authorisation for regular payments to be processed automatically.
The functionality of Google Pay recurring payments mirrors that of recurring card payments. For more details, please consult our guide.
Updated 10 months ago