Ir a contenido
Crea una cuenta o inicia sesión
Aquileo | Logotipo de la documentación de Stripe
/
Pregúntale a la IA
Crear cuentaIniciar sesión
Empezar
Pagos
Ingresos
Plataformas y marketplaces
Gestión del dinero
Recursos para desarrolladores
API y SDKAyuda
ResumenAceptar un pagoActualiza tu integración
Pagos por Internet
ResumenEncuentra tu caso de uso
Utiliza Payment Links
Crear una página de pagos
Crea una integración personalizada con Elements
Desarrolla una integración en la aplicación
Usa Managed Payments
Usar el proceso de compra de Studio
Pagos recurrentes
Pagos en persona
Terminal
Métodos de pago
Añadir métodos de pago
    Resumen
    Opciones de integración de los métodos de pago
    Gestiona los métodos de pago predeterminados en el Dashboard
    Tipos de método de pago
    Tarjetas
    Pagar con el saldo de Stripe
    Pagos con criptomonedas estables
    Adeudos bancarios
    Redireccionamientos bancarios
    Transferencias bancarias
    Vales de comida
    Transferencias de crédito (Sources)
    Compra ahora y paga después
    Pagos en tiempo real
    Vales
    Monederos
      Alipay
      Amazon Pay
      Apple Pay
      Cash App Pay
      Google Pay
      GrabPay
      Link
      MB WAY
      MobilePay
      PayPal
      PayPay
      Revolut Pay
      Satispay
      Secure Remote Commerce
      Vipps
      WeChat Pay
    Requisitos regionales especiales
    Métodos de pago personalizados
Gestiona los métodos de pago
Proceso de compra más rápido con Link
Aspectos básicos de las operaciones de pago
Análisis
Saldos y plazos de liquidación
Cumplimiento de la normativa y seguridad
Divisas
Pagos rechazados
Disputas
Protección antifraude de Radar
Transferencias
RecibosReembolsos y cancelaciones
Integraciones avanzadas
Flujos de pagos personalizados
Capacidad adquirente flexible
Pagos fuera de la sesión
Orquestación de varios responsables del tratamiento
Más allá de los pagos
Constituye tu empresa
Criptomonedas
Comercio agéntico
Financial Connections
Climate
Verificar identidades
España
Español (España)
  1. Inicio/
  2. Pagos/
  3. Add payment methods/
  4. Wallets

Google Pay

Learn how to accept payments using Google Pay.

Nota

As of September 2019, a regulation called Strong Customer Authentication (SCA) requires businesses in Europe to request additional authentication for online payments. Google Pay fully supports SCA as it already handles payment flows with a built-in layer of authentication (biometric or password).

Learn more about SCA and how it might impact your business.

Tarifas y comisiones

Para obtener información sobre las comisiones de transacción de los métodos de pago, consulta los detalles de las tarifas.

Google Pay allows customers to make payments in your app or website using any credit or debit card saved to their Google Account, including those from Google Play, YouTube, Chrome, or an Android device. Use the Google Pay API to request any credit or debit card stored in your customer’s Google account.

Google Pay is fully compatible with Stripe’s products and features (for example, recurring payments), allowing you to use it in place of a traditional payment form whenever possible. Use it to accept payments for physical goods, donations, subscriptions, and so on.

Google Pay terms

By integrating Google Pay, you agree to Google’s terms of service.

  • Customer locations

    Worldwide except India

  • Presentment currency

    See supported presentment currencies

  • Payment confirmation

    Customer-initiated

  • Payment method family

    Wallet

  • Recurring payments

    Yes

  • Payout timing

    Standard payout timing applies

  • Connect support

    Yes

  • Dispute support

    Yes

  • Manual capture support

    Yes

  • Refunds / Partial refunds

    Yes / Yes

Using Stripe and Google Pay versus the Google Play billing system

This guide explains how to configure your app to accept Google Pay for physical goods, services, and other eligible items. Stripe processes these payments, and you pay only Stripe’s processing fees.

For digital products, content, and subscriptions sold in the US or the European Economic Area (EEA), your Android app can accept payments directly in-app through a third-party payment processor such as Stripe. You can use these payment UIs:

  • Mobile Payment Element to accept payments directly in-app
  • Stripe Checkout to redirect customers to a Stripe-hosted payment page
  • Payment Links for a limited number of products and prices

For more information about which purchases must use the Google Play billing system, see Google Play’s developer terms.

Accept a payment using Google Pay in your Android app

GooglePayLauncher, part of the Stripe Android SDK, is the fastest and easiest way to start accepting Google Pay in your Android apps.

Prerequisites

To support Google Pay in Android, you need the following:

  • A minSdkVersion of 19 or higher.
  • A compileSdkVersion of 28 or higher.

Additionally, if you wish to test with your own device, you need to add a payment method to your Google Account.

Set up your integration

This guide assumes you’re using the latest version of the Stripe Android SDK.

build.gradle
Groovy
Kotlin
No results
dependencies { implementation 'com.stripe:stripe-android:23.10.1' }

Para usar Google Pay, debes añadir lo siguiente a la etiqueta <application> de tu AndroidManifest.xml para habilitar la API de Google Pay:

AndroidManifest.xml
<application> ... <meta-data android:name="com.google.android.gms.wallet.api.enabled" android:value="true" /> </application>

Para obtener más detalles, consulta la documentación de Google Pay sobre cómo configurar la API de Google Pay para Android.

Cree un PaymentIntent

Server-side

Create a PaymentIntent on your server with an amount and currency. Always decide how much to charge on the server side, a trusted environment, as opposed to the client side. This prevents malicious customers from choosing their own prices.

Command Line
curl
Ruby
Python
PHP
Java
Node.js
Go
.NET
No results
curl https://api.stripe.com/v1/payment_intents \ -u
sk_test_CGGvfNiIPwLXiDwaOfZ3oX6Y
:
\ -d "amount"=1099 \ -d "currency"="usd"

Client-side

A PaymentIntent includes a client secret. You can use the client secret in your Android app to securely complete the payment process instead of passing the entire PaymentIntent object. In your app, request a PaymentIntent from your server and store its client secret.

CheckoutActivity.kt
Kotlin
Java
No results
Ver la muestra completa
class CheckoutActivity : AppCompatActivity() { private lateinit var paymentIntentClientSecret: String override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // ... startCheckout() } private fun startCheckout() { // Request a PaymentIntent from your server and store its client secret in paymentIntentClientSecret // Click View full sample to see a complete implementation } }

Add the Google Pay button

Add the Google Pay button to your app by following Google’s tutorial. This ensures you’re using the correct assets.

Instantiate GooglePayLauncher

Next, create an instance of GooglePayLauncher in your Activity or Fragment. This must be done in Activity#onCreate().

GooglePayLauncher.Config exposes both required and optional properties that configure GooglePayLauncher. See GooglePayLauncher.Config for more details on the configuration options.

Kotlin
Java
No results
import com.google.android.gms.wallet.button.PayButton class CheckoutActivity : AppCompatActivity() { // fetch client_secret from backend private lateinit var clientSecret: String private lateinit var googlePayButton: PayButton override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.checkout_activity) PaymentConfiguration.init(this, PUBLISHABLE_KEY) googlePayButton = /* TODO: Initialize button by following Google's guide. */ val googlePayLauncher = GooglePayLauncher( activity = this, config = GooglePayLauncher.Config( environment = GooglePayEnvironment.Test, merchantCountryCode = "US", merchantName = "Widget Store" ), readyCallback = ::onGooglePayReady, resultCallback = ::onGooglePayResult ) googlePayButton.setOnClickListener { // launch `GooglePayLauncher` to confirm a Payment Intent googlePayLauncher.presentForPaymentIntent(clientSecret) } } private fun onGooglePayReady(isReady: Boolean) { // implemented below } private fun onGooglePayResult(result: GooglePayLauncher.Result) { // implemented below } }

After instantiating GooglePayLauncher, the GooglePayLauncher.ReadyCallback instance is called with a flag indicating whether Google Pay is available and ready to use. This flag can be used to update your UI to indicate to your customer that Google Pay is ready to be used.

Kotlin
Java
No results
import com.google.android.gms.wallet.button.PayButton class CheckoutActivity : AppCompatActivity() { // continued from above private lateinit var googlePayButton: PayButton private fun onGooglePayReady(isReady: Boolean) { googlePayButton.isEnabled = isReady } }

Launch GooglePayLauncher

Una vez que Google Pay esté disponible y tu aplicación haya obtenido un secreto de cliente PaymentIntent o SetupIntent, debes lanzar GooglePayLauncher utilizando el método apropiado. Cuando confirmes un PaymentIntent, usa GooglePayLauncher#presentForPaymentIntent(clientSecret). Cuando confirmes un SetupIntent, usa GooglePayLauncher#presentForSetupIntent(clientSecret).

Kotlin
Java
No results
import com.google.android.gms.wallet.button.PayButton class CheckoutActivity : AppCompatActivity() { // fetch client_secret from backend private lateinit var clientSecret: String private lateinit var googlePayButton: PayButton override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) // instantiate `googlePayLauncher` googlePayButton.setOnClickListener { // launch `GooglePayLauncher` to confirm a Payment Intent googlePayLauncher.presentForPaymentIntent(clientSecret) } } }

Handle the result

Finally, implement GooglePayLauncher.ResultCallback to handle the result of the GooglePayLauncher operation.

The result can be GooglePayLauncher.Result.Completed, GooglePayLauncher.Result.Canceled, or GooglePayLauncher.Result.Failed.

Kotlin
Java
No results
class CheckoutActivity : AppCompatActivity() { // continued from above private fun onGooglePayResult(result: GooglePayLauncher.Result) { when (result) { GooglePayLauncher.Result.Completed -> { // Payment succeeded, show a receipt view } GooglePayLauncher.Result.Canceled -> { // User canceled the operation } is GooglePayLauncher.Result.Failed -> { // Operation failed; inspect `result.error` for the exception } } } }

Go live with Google Pay

Follow Google’s instructions to request production access for your app. Choose the integration type Gateway when prompted, and provide screenshots of your app for review.

After your app has been approved, test your integration in production by setting the environment to GooglePayEnvironment.Production, and launching Google Pay from a signed, release build of your app. Remember to use your live mode API keys. You can use a PaymentIntent with capture_method = manual to process a transaction without capturing the payment.

Prueba Google Pay

Google te permite realizar pagos de prueba a través de su paquete de tarjetas de prueba. El paquete de pruebas es compatible con el uso de tarjetas de prueba de Stripe.

Para probar Google Pay, debes utilizar un dispositivo Android físico en lugar de un dispositivo simulado, en un país donde Google Pay sea compatible. Inicia sesión en una cuenta de Google en tu dispositivo de prueba con una tarjeta real guardada en Google Wallet.

Creating a PaymentMethod

If you confirm your payment on your server, you can use GooglePayPaymentMethodLauncher to only collect a PaymentMethod instead of confirm payment.

Kotlin
Java
No results
import com.google.android.gms.wallet.button.PayButton class CheckoutActivity : AppCompatActivity() { private lateinit var googlePayButton: PayButton override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView(R.layout.checkout_activity) PaymentConfiguration.init(this, PUBLISHABLE_KEY) googlePayButton = /* TODO: Initialize button by following Google's guide. */ val googlePayLauncher = GooglePayPaymentMethodLauncher( activity = this, config = GooglePayPaymentMethodLauncher.Config( environment = GooglePayEnvironment.Test, merchantCountryCode = "FR", merchantName = "Widget Store" ), readyCallback = ::onGooglePayReady, resultCallback = ::onGooglePayResult ) googlePayButton.setOnClickListener { googlePayLauncher.present( currencyCode = "EUR", amount = 2500 ) } } private fun onGooglePayReady(isReady: Boolean) { googlePayButton.isEnabled = isReady } private fun onGooglePayResult( result: GooglePayPaymentMethodLauncher.Result ) { when (result) { is GooglePayPaymentMethodLauncher.Result.Completed -> { // Payment details successfully captured. // Send the paymentMethodId to your server to finalize payment. val paymentMethodId = result.paymentMethod.id } GooglePayPaymentMethodLauncher.Result.Canceled -> { // User canceled the operation } is GooglePayPaymentMethodLauncher.Result.Failed -> { // Operation failed; inspect `result.error` for the exception } } } }

Disputes

Users must authenticate payments with their Google Pay accounts, which reduces the risk of fraud or unrecognized payments. However, users can still dispute transactions after they complete payment. You can submit evidence to contest a dispute directly. The dispute process is the same as that for card payments. Learn how to manage disputes.

Liability shift for Google Pay charges

Google Pay supports liability shift globally. This is true automatically for users on Stripe-hosted products and using Stripe.js. For Visa transactions outside of a Stripe-hosted product, you must enable liability shift in the Google Pay & Wallet Console. To do so, go to your Google Pay & Wallet Console, select Google Pay API in the navigation bar on the left, and then enable Fraud Liability Protection for Visa Device Tokens for liability shift protection.

There are three use cases of Google Pay transactions:

  1. If the user adds a card to the Google Pay app using their mobile device, this card is saved as a Device Primary Account Number (DPAN), and it supports liability shift by default.
  2. If the user adds a card to Chrome or a Google property (for example, YouTube, or Play), it’s saved as a Funding Primary Account Number (FPAN). When you use 3D Secure, we globally support liability shift for all major networks, including Visa. You can customize Stripe Radar rules to request activation of 3D Secure.
  3. If the user selects Google Pay as the payment method on an e-commerce site or in an app that pays with Google Pay, the cards are saved as e-commerce tokens that represent the cards on file. Neither liability shift nor 3D Secure are supported for e-commerce tokens at this time.

For Sigma users, the charges table contains a card_token_type field that indicates the Google Pay transaction type. An FPAN transaction sets the card_token_type to fpan. DPAN and ecommerce token transactions set the card_token_type to dpan_or_ecommerce_token.

Refunds

You can partially or fully refund any successful Google Pay payment. The refund process is the same as that for card payments. See Refund and cancel payments for instructions on initiating or managing refunds.

¿Te ha sido útil la página?
SíNo
  • ¿Necesitas ayuda? Ponte en contacto con el equipo de soporte.
  • Chatea con desarrolladores Stripe en Discord.
  • Echa un vistazo a nuestro registro de cambios.
  • ¿Tienes alguna pregunta? Ponte en contacto con el equipo de ventas.
  • ¿LLM? Lee llms.txt.
  • Con tecnología de Markdoc
En esta página