Google Pay
General information
Google Pay™ is a digital wallet from Google that enables customers to make payments with just a few clicks, using payment cards linked to their Google accounts on websites and Android mobile applications, without the need to enter full payment details every time.
To integrate Google Pay™, you can choose one of the following methods:
- WhiteBoot hosted integration, where the Google Pay™ button is placed on our payment page.
- Integration with the Google Pay™ API, which involves placing a Google Pay™ button on your site.
Please keep in mind that currently, this payment method supports the use of Visa, Mastercard.
The list of countries and currencies which we support for Google Pay™ wallet.
Before starting the integration:
- Register in the merchant portal.
- Read the Google Pay™ and Wallet APIs Acceptable Use Policy and Google Pay™ API Terms of Service.
- Ensure that your website complies with Google Pay™ branding requirements.
WhiteBoot hosted integration
If you opt for the hosted integration, the Google Pay™ payment method will be placed on our payment page alongside the option to pay with cards. To set up this integration, proceed with the regular hosted integration process and inform WhiteBoot Support that you wish to add the payment method.
The Google Pay payment method is not supported when using a solution that displays the checkout in WebView mode in mobile apps on Android. To use this method, we recommend integrating through the Mobile SDK.
Integration with Google Pay™ API
To integrate Google Pay™ into your website or mobile application, you will need to follow these steps:
- Ensure that your website uses HTTPS and supports TLS for secure communication.
- Use one of the supported browsers, such as Google Chrome, Mozilla Firefox, Apple Safari, Microsoft Edge, Opera, or UCWeb UC Browser.
- Obtain your Merchant ID and follow the integration procedure provided by Google Pay™.
Check out the documentation related to the integration process, which includes the following:
- The API documentation for mobile applications and websites.
- The guide to the use of branded materials for mobile applications and websites.
Set the gateway parameter in the script to the constant value of WhiteBoot.
Ensure that the value of the gatewayMerchantId parameter corresponds to the identifier of your project (pos_id) for payment processing.
In response, Google will return the PaymentData item, and the paymentMethodData.tokenizationData.token field should contain a safely encrypted Google Pay™ Token (a string of characters).
Charging:
To charge a payment card stored in Google Pay™, send a direct payment creation request with properties.instrument_method.
Google Pay data must be sent in the properties object:
| Parameter | Type | Required | Description |
|---|---|---|---|
pos_id | UUID | ✅ | Merchant's identifier (POS_ID) |
mode | MODE | ✅ | direct |
method | METHOD | ✅ | Payment method (auth or purchase) |
amount | Number | ✅ | Transaction amount. Must be a positive number. The number of decimal digits must be less than or equal to 2 (e.g., 100.00, 250, 50.50) |
currency | CURRENCY | ✅ | Transaction currency (ISO_4217) |
description | String | ✅ | Payment description |
order_id | String | ✅ | Unique identifier of order |
order_3ds_bypass | String | ✅ | 3-D Secure flow option |
customer_id | String | Customer's identifier in merchant's system | |
customer_fname | String | ✅ | Customer's first name |
customer_lname | String | ✅ | Customer's last name |
customer_patronym | String | Customer's patronym | |
customer_email | String | ✅ | Customer's email |
customer_phone | String | ✅ | Customer's phone |
customer_ip | String | ✅ | Customer's IP address |
customer_country | String | ✅ | Customer's country (ISO 3166-1 alpha-2). For instance, UA for Ukraine |
customer_city | String | ✅ | Customer's city |
customer_birthday | String | ✅ | Customer's birthday (format: yyyy-MM-dd) |
server_url | URL | Webhook notification will be sent to this URL | |
result_url | URL | Customer will be redirected to this URL after payment | |
payload | String | Field for merchant custom data. Max 4000 symbols. | |
validation_url | String | Preflight request will be sent to this URL | |
browser_fingerprint | Json | ✅ | Browser fingerprint. These parameters could be used in 3DS 2.0 verification. |
properties.instrument_type | String | ✅ | wallet |
properties.instrument_method | String | ✅ | GPAY |
properties.state | String | ✅ | Customer's state |
properties.address | String | ✅ | Customer's address |
properties.post_code | String | ✅ | Customer's postal code |
The properties.instrument_method field determines which wallet payment method is displayed on the payment page. Allowed values:
| Value | Displayed on the payment page |
|---|---|
GPAY | Google Pay only |
AGPAY | Apple Pay and Google Pay |
Request example:
{
"mode": "direct",
"method": "purchase",
"currency": "EUR",
"amount": 11.52,
"description": "Payment 100500001A3248877485",
"payway": "wallet",
"customer_fname": "Tom",
"customer_lname": "Hanks",
"customer_email": "tom.hanks@example.com",
"customer_phone": "61432068613",
"customer_country": "AU",
"customer_city": "Angle Vale",
"customer_ip": "194.183.171.239",
"properties": {
"instrument_type": "wallet",
"instrument_method": "GPAY",
"address": "Al. Jana Pawla II",
"post_code": "00-823",
"state": "FR"
},
"pos_id": "2affde24-3257-4fb5-805d-ff4a77ea72ac",
"order_3ds_bypass": "supported",
"order_id": "ef53a22d675742939c3005c127892cf4",
"server_url": "https://callback.blackhole.com/callback",
"result_url": "https://example.com/result",
"browser_fingerprint": {
"browserColorDepth": "24",
"browserScreenHeight": "860",
"browserScreenWidth": "1600",
"browserJavaEnabled": "false",
"browserLanguage": "en-US",
"browserTimeZone": "Europe/Kiev",
"browserTimeZoneOffset": "-120",
"browserAcceptHeader": "text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,*/*;q=0.8",
"browserIpAddress": "127.0.0.1",
"browserUserAgent": "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.146 Safari/537.36"
}
}
You can configure rules for customer confirmation of Google Pay™ payments in the payment creation request by providing the relevant value for order_3ds_bypass.
More details about order_3ds_bypass.
Please note! The acquiring bank may additionally request confirmation for payments using Google Pay™. In this case, the payer will need to confirm the payment using 3DS or OTP code on the card issuer's page to complete the transaction.
Further processing of the request follows the standard payment process used in direct integration.
You can use the Google Pay™ payment method in Sandbox mode. To obtain test environment credentials, please contact WhiteBoot Support.