Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

156
Vistas
create payment with the token of a saved card and 3d secure

I have integrated Stripe for payments. I managed to save a card by obtaining the token, created the customer, and associated the token with the customer. Now I am trying to make a backend (node) side payments using this code:

    const createCharge = await stripe.charges.create({
        amount,
        currency: 'eur',
        customer: user.stripeCustomerId,
        card: cardId,
        description: `userId: ${user._id}`,
      });

If the card does not require authentication it works perfectly while if authentication is required it obviously fails with the error: authentication_required. I tried to add authentication with 3d secure in-app but without success, this is what I tried but I always get errors and no authentication is done

    const { paymentIntent, error } = await confirmPayment(clientSecret.client_secret, {
            payment_method_options:{
                "card": {
                    "installments": null,
                    "network": null,
                    "request_three_d_secure": "any"
                }
            },
            type: 'Card',
            cardDetails: this.props.cardList[0].cardId,
            payment_method:'creditCard',
            setupFutureUsage: 'OffSession',
        });

Does anyone have any idea what I'm doing wrong? Thanks!

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda