> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dintero.com/llms.txt
> Use this file to discover all available pages before exploring further.

<AgentInstructions>

## Submitting Feedback

If you encounter incorrect, outdated, or confusing documentation on this page, submit feedback:

POST https://docs.dintero.com/feedback

```json
{
  "path": "/docs/checkout/google-pay/google-pay-hosted-checkout",
  "feedback": "Description of the issue"
}
```

Only submit feedback when you have something specific and actionable to report.

</AgentInstructions>

# Dintero Hosted Checkout

> Enable Google Pay in Dintero Hosted Checkout for embedded, pop-out, or redirect flows, supported via dintero_psp.googlepay or Worldline integrations.

The easiest way to use Google Pay is by using the Dintero checkout solution, where we handle the whole payment flow for you. If you are already using Dintero checkout you just need to enable Google Pay.

<Info>
  Embedding Google Pay is only supported with `dintero_psp.googlepay`. If you are using Google Pay via Worldline (`bambora.googlepay` in the API), embedding is not supported. However, *pop-out* or *redirect* flows are available.
</Info>

### Getting started

To use Google Pay as a payment method you have to ensure you follow
Google Pay APIs [Acceptable Use Policy](https://payments.developers.google.com/terms/aup) and
accept Google Pay APIs [Terms of Service](https://payments.developers.google.com/terms/sellertos).

You also have to [set up a Dintero account](https://onboarding.dintero.com/).

#### Enable Google Pay on your Dintero account

During your onboarding, Google Pay will generally be enabled as a payment method by default. If it's not
enabled, you can go to settings and payment methods. There you can enable Google Pay as a payment method for your
account. If you use [payment profiles](https://docs.dintero.com/docs/checkout/payment-profiles) ensure that
Google Pay is added to the relevant profiles.

#### Authentication methods

Google Pay can provide both cards on file (`PAN_ONLY`) or device tokens (`CRYPTOGRAM_3DS`). Device tokens are bound to an Android device and authenticated with a 3-D Secure cryptogram. Both authentication methods are supported for hosted checkout.

#### 3-D Secure

Device tokens will generally not require 3-D Secure authentication as they are already authenticated, while `PAN_ONLY` will generally require 3-D Secure authentication. For hosted checkout we will handle 3-D Secure for you, both determining if it is required as well as handling the authentication flow.

#### One click Google Pay in Checkout Express

For [Checkout Express sessions](https://docs.dintero.com/docs/checkout/express) we support a one click Google Pay checkout flow where the customer can pay by clicking a Google Pay button that is shown above the customer data form. When the customer clicks this button the session is updated with customer details from Google Pay and the customer selects a shipping option in the Google Pay UI.

Since Google Pay's express features behaves a bit differently from the default Checkout Express flow this requires an opt in property in the payment session configuration, the `allow_express_wallet_payment` must be set to `true`.

Google Pay can still be used for payment in Express Checkout when this flag is not set. Google Pay will then be shown next to the other payment options after the customer has entered their address details manually.

### Testing

#### Sandbox Environment

If you enable test mode and create a payment with Google Pay, you will get a dialog where you can select the card
with the desired behavior. This uses a Google Pay sandbox to simulate getting a payload from Google Pay.

The test payments will not charge any cards.

#### Production Testing

Once you are ready to test in production you can enable Google Pay for production and try payments.
Note that this will actually charge your card, but you can cancel or refund the payment after testing.

If you want to avoid exposing Google Pay to customers while testing in production you can set up a
[payment profiles](https://docs.dintero.com/docs/checkout/payment-profiles) and add Google Pay
to a profile that isn't used for customers.
