Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

185
Visualizações
React Native: Google Pay/Apple pay using CardField instead of PaymentSheet in Stripe SDK

currently I can't seem to find how to use Google Pay or Apple Pay with CardField component, is it currently possible?

I'm using this Stripe's official reaft-native sdk:

https://github.com/stripe/stripe-react-native

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

you can use initPaymentSheet. This is from what I can see and know the only solution that we have right now (used by me) for Apple or Google Pay... I don't know why the docs (https://github.com/stripe/stripe-react-native) do not talk on their front page about this option, but for me worked just fine. Also, make sure you check the stipe official docs also for more info because they also help with examples and explain the logic for why/how/what to do certain things (stripe docs).

A small example that can help you and others is below:

import {
    useStripe,
} from '@stripe/stripe-react-native';

const {initPaymentSheet, presentPaymentSheet} = useStripe();

IMPORTANT:

In order to show ('work') the bottom sheet (initPaymentSheet) you need either paymentIntentClientSecret OR setupIntentClientSecret. Make sure that you have one of these 2 if not you will get an error :).

await initPaymentSheet({
                applePay: true,
                googlePay: true,
                customerId: customerId,
                merchantCountryCode: merchantCountryCode,
                merchantDisplayName: merchantDisplayName,
                paymentIntentClientSecret: paymentIntentClientSecret,
                setupIntentClientSecret: setupIntentClientSecret,
                customerEphemeralKeySecret:ephemeralKeySecret,
                style: 'alwaysLight',
                primaryButtonColor: 'red',
                allowsDelayedPaymentMethods: true,
                testEnv: 'development',
                customFlow: false,
                defaultBillingDetails: {
                    address: {
                        city: city,
                        country: country,
                        line1: line1,
                        line2: line2,
                        postalCode: postalCode,
                        state: state,
                    },
                    name: name,
                    email: email,
                    phone: phone,
                },
                returnURL: returnURL,
            });
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda