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:
- Financial Line 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, Google Pay™ API Terms of Service and Google Pay/Google Payments Terms of Service.
- Ensure that your website complies with Google Pay™ branding requirements.
Financial Line 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 Financial Line Support that you wish to add the payment method.
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 finline
.
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 the payment card stored under Google Pay™, in the direct method request fill in payway
and cc_token
with the following values:
payway: gpay
mode: direct
cc_token: gpay:{base64_google_encrypted_token}
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
Request example:
$ curl -i "{{API_URL}}/api/v1/payment" \
-H "Content-Type: application/json" \
-H "X-API-AUTH: CPAY {API_KEY}:{API_SECRET}" \
-H "X-API-KEY: {ENDPOINTS_KEY}" \
-X POST -d '{
"pos_id": "{POS_ID}",
"mode": "direct",
"method": "purchase",
"amount": 1,
"currency": "UAH",
"order_3ds_bypass": "supported",
"cc_token": "gpay:hlSzZOQVF5blNvVW9zVUtnSUh0MURMbWxsLzdIYUhzM3E5U2RDSnhLMGd3ZGN2eTBCd25Nb3A0WVc4L25PN0RRRHpZdXpzL1VRY3Y2Z0xZbCtocGFzREN4NnpjUW95TFVJaU9kZkVKcjczRnNsN3RlUVcwSnpzd0o5NzF6STFmeVgzWVM1K2dDb3VxYjBOVmowMEd6REM0V3MxZzg3RHBkd2gwS3hydmM4MVU3cTY5ejdlbnZwLzhaNkYwMGZZTnU2b292eVZ3MytFV3pIT0d3d0R1RFJuZ01Rdjh0a1VIZmp2SEVtZEdaZjczUFlMOWdIZi9ZUU51RjQxV1JiNG1CbGRqWFBXTHk0Q3hlREJNaFJYcGxvMjNyVjY4WHZ6RGxIUERHYlFyZHViV2YwSU1JbEZsMnJmRWIvVm1IS21SQlhKYzNQaktra0t6QVhrMVZXdnhmVkN1cEpZRzYrNGZqZVBFRllhcEo3ZVpJbHpXL3AvTGNJTHE2UlYrWWJTRE9aOURTREQ1TEswYVpyY2FWR1Q5RnFwR090cnhaMTZLNzd2UnM4TWRDc1ZMVm4vUkhmRENHM25weks0WUlsWXFhMkxBV0MxQ2JGYllzUDRDaXAvL09TekhDNnRBOTJkVGVLYW1wYmdcXHUwMDNkXFx1MDAzZFwiLFwiZXBoZW1lcmFsUHVibGljS2V5XCI6XCJCSWtMdFRnSWx1VERBL3ZuQUYzZjRJNW55RklWb0hRcnZlbmFLRG4vYzlFR04wRVp6QlRld3ZCRWNrZVlwM0hqL1BheUtUbUNVVlpYMW9YN3NrbXdwcDBcXHUwMDNkXCIsXCJ0YWdcIjpcImlGQk9VdlRmVjBQV2VkWUkwSFByMnBUZi9pa1ZlRDlBOTA2eXZhSCtYV0FcXHUwMDNkXCJ9In0=yJzaWduYXR1cmUiOiJNRVlDSVFe1ptSEFidWDdi81NEpNMU1SSXlUb2FHdU1nMlVzZ0pVcE83a0tLbGRWZzg2UGdtR1pNQUloQU1wc1hveTk5UmUzdW1nTWo4NWMvdktDdHppMnAzYkdGUkJvWVV3UFBvakkiLCJpbnRlcm1lZGlhdGVTaWduaW5nS2V5Ijp7InNpZ25lZEtleSI6IntcImtleVZhbHVlXCI6XCJNRmt3RXdZSEtvWkl6ajBDQVFZSUtvWkl6ajBEQVFjRFFnQUVkQUR1UTVmQlBPZkFIdDBvcG5rYlhmVlluZkNhdkNqSTBkNW5ISGVyM2JlRkhlY3A3dnpGNzhkTE1qVE4yOEFvRlRPb1duV1l3Z0E1N0FtN2Y3dkNMd1xcdTAwM2RcXHUwMDNkXCIsXCJrZXlFeHBpcmF0aW9uXCI6XCIxNzA0MjgwNDQxNjY3XCJ9Iiwic2lnbmF0dXJlcyI6WyJNRVVDSUE2cWI5L1BMYU51Y2JEY0dxYXBWR3ZxWDZFbWUvUVdwT0Q2MzgyUlY1Rk1BaUVBdmdwL1BzMmxXa2NBbmR0OFVnSG1xVmlyN3QxdGttWC9TNmpMT1pxRmJBZ1x1MDAzZCJdfSwicHJvdG9jb2xWZXJzaW9uIjoiRUN2MiIsInNpZ25lZE1lc3NhZ2UiOiJ7XCJlbmNyeXB0ZWRNZXNzYWdlXCI6XCJVYjdkVEw0MERXeUFjQ1dXSFBZOFQ2NGUraUIyR",
"products":[],
"customer_email": "test@gmail.com",
"description": "Pay with Google Pay™ Token",
"order_id": "1234567890",
"server_url": "https://callback.blackhole.com/callback",
"result_url": "https://example.com/result"
}'
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 Financial Line Support.