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

68
Visualizações
how to create stripe webcheckout session in react native app for online booking

I am working on a booking project using react native having its backend in nodejs express trying to implement webcheckout using stripe. already have the model set up in the backend server, having difficulty calling the stripe online checkout.

redirectToCheckout not working on react native. also having difficulty using react-native-stripe-checkout-webview.

couple of months new to react native.

here is what have tried. cannot get the view on tab screen when click 0n pay button but can see my data when console.log

import StripeCheckout from 'react-native-stripe-checkout-webview';

const BookTour = async _id => {

        // 1) get checkout session from api

        const booking = await axios(`/api/v1/bookings/checkout-session/${_id}`)
        const data = await booking;
        console.log(data)
        // 2) create checkout 

            // await stripe.redirectToCheckout({
            //     sessionId: data.session.id
            // });

        return (
            <StripeCheckout
            stripePublicKey='pk_test_51J5UwGJyQ6fuwVkq------'
            checkoutSessionInput={{
            sessionId: data.session.id,
            }}
            onSuccess={({ checkoutSessionId }) => {
            console.log(`Stripe checkout session succeeded. session id: ${checkoutSessionId}.`);
            }}
            onCancel={() => {
            console.log(`Stripe checkout session cancelled.`);
            }}
        />
        )
};
about 4 years ago · Juan Pablo Isaza
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