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

248
Views
How to get Card Country from Stripe Payment Element?

https://stripe.com/docs/payments/payment-element

How can I get Card Country by stripe-js or in a javascript hack way?

I really need to charge extra fee depends on the card country.

about 4 years ago · Santiago Gelvez
1 answers
Answer question

0

The PaymentElement allows you to collect card details client-side and confirm the PaymentIntent directly from that UI. This product doesn't let you first collect card details, create a PaymentMethod to then decide how much to charge server-side. The reason is that many transactions will require a customer action from handling 3D Secure for card details to redirecting to a partner such as Klarna or iDEAL payments and those happen at the time you confirm the PaymentIntent as part of the payment method details collection.

Unfortunately, this means that you will not be able to do the flow you're after. If you really need to build this, the best option is to use the "Card Element" integration which they document here. That will let you collect card details, create a PaymentMethod, and then do a roundtrip to your server to check the card's country and confirm for the amount you expect. You'd then handle 3D Secure client-side if needed.

about 4 years ago · Santiago Gelvez 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!