#andy-r_error

1 messages ¡ Page 1 of 1 (latest)

south spruceBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1298733063874019501

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

uneven meteor
#

For some added context:

  • My company has multiple 'purchase portals', and some of them are still using the older Stripe.js v2. These portals generate Sources, as they're still required by our backend stack. We're in the process of upgrading the entire platform to use PaymentIntents and PaymentMethods, but it will take time.
  • Other (newer) parts of our platform use PaymentIntents, PaymentMethods and Stripe.js v3.
  • We're in the process of migrating ALL portals over to Stripe.js v3, but we still need to generate Sources while we wait for the backend to launch support for PaymentIntents and PaymentMethods
  • In an ideal world, we'd be able to use a single PaymentElements element for all portals, and simply change the underlying method (createSource() > confirmPayment()) once we're able to deprecate sources completely.
south spruceBOT
fading fern
uneven meteor
#

Gotcha! Yeah that's why I was hoping that configuring the PaymentElement to explicitly use the 'card' type would help

fading fern
#

IIRC that parameter is for redirect based payment methods where you don't really submit raw card information via client-side but are taken to the provider page like klarna, ideal etc

#

It won't work for card payment methods

uneven meteor
#

Understood

#

Would you happen to know if there's any documentation that I could point to as far as the lack of support for PaymentElements w/ createSources? I'd like to be able to show something to my team, if possible

fading fern
#

Hmm I don't think we have any specific doc calling that out but you may be able to share this doc - https://docs.stripe.com/sources/cards#create-source

It shows card element being used with createSource and createSource has been deperecated where PaymentElement is not.