#balconytom-elements
1 messages ยท Page 1 of 1 (latest)
hi! that's not something the PaymentElement component is really designed or optimised for to day(just creating a PaymentMethod), it's really meant for a form that accepts payment details and starts the payment immediately.
Ideally Iโd like the following scenario to happen:
- Customer opens up the form
- Stripe elements are created and mounted
- Customer inputs their data (ie email, name, etc), and payment data (eg card number or other methods into stripe elements form)
- Upon submitting the form, payment data is validated, payment method created on the frontend and everything is then sent back to the server
- On the server customer is created, payment method attached and the actual payment (or subscription) is being created.
- The rest is done via web hooks.
So far Iโve been achieving this on the frontend with a separate card element and stripe.createPaymentMethod etc. Is such scenario possible with stripe elements?
Thx
yeah that's not really possible using the PaymentElement, that kind of two-step checkout is something you can do using the lower level individual Card Elements and manual confirmation (https://stripe.com/docs/payments/accept-a-payment-synchronously) as you likely do already.
it's common feedback and we have some work done on supporting it in future but nothing to announce yet
Ok, I see. So in order to support more payment methods now in this sceanrio I'd need to write code for them myself using other elements (https://stripe.com/docs/js/element/other_element) ?
pretty much, but also most payment methods don't really support that flow (creating PaymentMethods first and then confirming them on the server side later). It's really only cards that supports it, and it really only supports that for legacy migration reasons.
our recommended integrations are for client-side confirmation with UIs like the PaymentElement where entering the info leads to the payment attempt straight away, to increase conversion
but like I said we're doing some active work on enabling this two-step checkout flow much better with the PaymentElement, and there's even a beta for it I believe. If you have a Stripe contact you work with you could ask them about it!
OK, thanks very much for the detailed explanation, it put all the pieces into place for me
I'd be interested in using the beta, how do I get a Stripe contact ๐ ?
Hi ๐ jumping in as my teammate needed to step away. Unfortunately we're not terribly familiar with that side of things and what that process looks like, so I'm not sure.
sure thing, I'll figure that out ๐ thx again
also, what is the best way to keep track of stripe updates, eg when you release new stuff?
We have our changelog for changes to Stripe products in general:
https://stripe.com/blog/changelog
As well as an API specific changelog for any changes made to just the API:
https://stripe.com/docs/upgrades
And at the very bottom of any of our documentation pages (the API changelog linked above is a good example) there is an option to provide your email address and subscribe to our developer-oriented updates.
awesome, thx
Any time!