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

347
Views
How to retrieve card information such as card number with react-stripe-js?

I have

const stripeResponse = await stripe.confirmCardSetup(client_secret, {
      payment_method: {
        card: elements.getElement('cardNumber'),
        billing_details: {
          address: {
            city: selectedAddress.town,
            country: selectedAddress.country.iso3166Code,
            line1: selectedAddress.line1,
            line2: selectedAddress.line2,
            postal_code: selectedAddress.postalCode,
            state: selectedAddress.region,
          },
          email: 'ppp@mail.com',
          name,
          phone: selectedAddress.phone,
        },
      },
    });

With this I confirm card setup and I am using react-stripe-js inside react component:

import { CardNumberElement } from '@stripe/react-stripe-js';
//some component code below
...
<CardNumberElement options={options} />
...

It is not possible to get card number from CardNumberElement component.

How can I get card number with stripe?

the closest thing I could find was as below, but I need client js preferably react version of it enter image description here

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

You cannot get the card number from Stripe. That is a big part of why you need to use Stripe's libraries, so that card details don't touch your integration.

Full raw card number is never exposed in API responses from Stripe: https://stripe.com/docs/security/guide

about 4 years ago · Juan Pablo Isaza Report
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!