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:
- AI Fintech 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.
AI Fintech 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 AI Fintech 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.
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.
- Read the Google Pay™ APIs Acceptable Use Policy and Google Pay™ API Terms of Service.
- Ensure that your website or mobile application complies with Google Pay™ branding requirements.
- Review the documentation related to the integration procedure from Google Pay™ for mobile applications and websites.
- Register in the merchant portal Tranzzol.
- Complete the registration in Google Pay™ Business Console to obtain your Merchant ID and activate your account.
The process is as follows:- Registration
- Providing the necessary information and documents (Company name or individual name, Country of registration, Contact information, Documents verifying business ownership)
- Verification and confirmation of your account
- Domain verification (Providing screenshots of website pages, etc.)
- Obtaining Merchant ID and configuring API keys
- Use the API documentation for mobile applications and websites.
Set the gateway parameter in the script to the constant value of aifintech.
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:
The Google Pay™ API allows payments to be authenticated using methods that enhance security and simplify the checkout process. These approaches affect transaction protection.
There are 2 authentication methods:
PAN_ONLY: This authentication method is associated with payment cards stored on file with the user's Google Account. Returned payment data includes personal account number (PAN) with the expiration month and the expiration year.
CRYPTOGRAM_3DS: This authentication method is associated with cards stored as Android device tokens. Returned payment data includes a 3-D Secure (3DS) cryptogram generated on the device.
AI Fintech supports both of these methods.
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: gpaymode: directcc_token: gpay:${base64_google_encrypted_token}
For Google Pay™ payments with PAN_ONLY require mandatory 3DS verification. This helps ensure a secure payment process and prevent fraud.
To do this, pass order_3ds_bypass = always in the payment request.
We recommend reviewing the guidelines on working with the 3D Secure protocol.
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 -X POST \
https://api.aifintech.ua/api/v1/payment \
-H 'Content-Type: application/json' \
-H 'X-API-Auth: CPAY <API_KEY>:<API_SECRET>' \
-H 'X-API-Key: <ENDPOINTS_KEY>' \
-d '{
"pos_id": "<POS_ID>",
"mode": "direct",
"method": "purchase",
"amount": 1,
"currency": "UAH",
"order_3ds_bypass": "always",
"cc_token": "gpay:hlSzZOQVF5blNvVW9zVUtnSUh0MURMbWxsLzdIYUhzM3E5U2RDSnhLMGd3ZGN2e...",
"products":[],
"customer_email": "[email protected]",
"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.
During payment, in certain cases at the request banks or regulators the user may be required to provide additional information, such as a phone number or billing address.
To ensure correct handling of these scenarios, when initializing the Google Pay™ button on your website you should include the phoneNumber and billingAddress parameters.
Detailed information about these parameters is available in the official Google Pay™ documentation at the following link.