Google Pay™ Payments

This document applies to the following country:
| Brazil |
|---|
Accept payments through Google Pay™, Google's digital wallet. The buyer pays with a card saved to their Google account, and your integration receives an encrypted payment token instead of the real card number.
This guide shows you how to create a payment intent and get the Google Pay token on the frontend. You then submit the payment through a single Web Checkout API integration.
How it works
Use Google Pay to offer buyers on Android and web a fast, tokenized checkout. Buyers don't have to type in card details. Key characteristics:
- No card entry: the buyer pays with the cards already saved to their Google account.
- Encrypted token: the frontend gets a payment token from the Google Pay API and forwards it to Getnet. The real card number is never exposed.
- Native authentication: the payment bypasses the 3DS flow.
- No prior session validation: Google Pay does not require a session validation step.
- Synchronous processing: submitting the payment returns the result (status / authorization_code) in the same call.
The end-to-end flow involves the buyer, your frontend, your backend, and the Getnet Web Checkout API:
Before you start
Make sure the following are in place before integrating:
- The seller (x-seller-id) has Google Pay enabled.
- Your frontend Google Pay API integration has the correct gateway and gatewayMerchantId configured, so Getnet can process the token.
- You have an authentication token, generated by following the Authentication document.
- Domain onboarding is complete for your integration type (see below).
Technical onboarding by integration type
The domain registration you need depends on your integration type:
| Integration type | Domain registration |
|---|---|
| Link & Redirect API | Uses the Getnet domain, no merchant domain registration required. |
| Iframe & Lightbox | Your domain differs from the Getnet domain. You must provide your domain in the Web Checkout configuration so Getnet can register it with Google. |
Info: You can set the checkout type (Iframe & Lightbox) and the accepted options in the Merchant Portal or by API. To configure them, follow the steps for the Merchant Portal or the API.
Step 1: Create the payment intent
payment_intent_id and a redirect_url.| Endpoint |
|---|
POST /payment-intent |
| Field | Type | Description | Example |
|---|---|---|---|
payment.currency | String | Currency code. | BRL |
payment.amount | Integer | Purchase amount in integer format, where the last 2 digits represent the cents. For countries where cents do not apply, fill in the amount with 2 zeros to the right. | 92500 |
customer.customer_id | String | We recommend using the customer's document number. Use only letters and numbers, without special characters, separators or spaces. | 12345678912 |
customer.first_name | String | Customer's first name. | John |
customer.last_name | String | Customer's last name. | Doe Smith |
customer.name | String | Customer's full name. | John Doe Smith |
customer.email | String | Customer's email address. | customer@email.com.br |
customer.document_type | String | Type of the document used to identify the customer. | CPF |
customer.document_number | String | Document number used to identify the customer. | 12345678912 |
customer.billing_address.street | String | Name of a street. | Av. Brasil |
customer.billing_address.number | String | Number that identifies the position of a building on a street. | 1000 |
customer.billing_address.country | String | Country code. | BR |
customer.billing_address.postal_code | String | Postal or ZIP code. | 90230060 |
| Field | Type | Description | Example |
|---|---|---|---|
configurations.3ds | boolean | Controls 3D Secure authentication. | true or false |
configurations.preauthorization | boolean | Indicates if the payment is a pre-authorization. | true or false |
configurations.card_verification | boolean | Indicates if this is a card verification flow. | true or false |
configurations.success_url | string | Redirect URL in case of successful payment. | https://www.mystore.com/checkout/success |
configurations.error_url | string | Redirect URL in case of an error during payment. | https://www.mystore.com/checkout/error |
product | array | Line items. | --- |
soft_descriptor | string | Payment description that appears on the customer's receipt. | Loja BR |
expires_at | string | Payment intent expiration. | 3d4h15m |
Field filling rules
- The
expires_atfield accepts a duration value (for example, 15m, 2h, 7d, or 1d12h30m). This duration is applied regardless of the merchant's timezone. The expiration timestamp returned by the API is always formatted in GMT+0 (UTC). If you provide no value, the payment intent does not expire. - When you provide
success_urlanderror_urlin the payment intent request, they override the values configured in the seller's technical configuration.
Example request
The following example shows a payment intent request:
Step 2: Redirect and get the token
redirect_url, or show the embedded checkout screen where they choose Google Pay. The buyer authenticates on their Android device or browser (bypassing 3DS).Step 3: Confirm the result
status and authorization_code. Before you release the order, also confirm the result through the webhook sent to notification.url.The webhook status can be Authorized or Denied.
Approved webhook response
The following example shows an approved webhook response:
Denied webhook response
The following example shows a denied webhook response:
On this page