Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

157
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!