#jonwaldstein

1 messages · Page 1 of 1 (latest)

eager vigilBOT
wild oxide
#

Hello! The approach you mentioned won't work, unfortunately. The recommended approach is to adjust your flow to determine if you're going to need a Subscription or a standalone Payment Intent prior to displaying the Payment Element.

amber hollow
#

So basically, if the donor selects recurring - I would need to hit the server for a Stripe Subscription and rebuild the payment element using the new intent?

wild oxide
#

Yeah, or ideally not event show the Payment Element until they've made a selection.

eager vigilBOT
amber hollow
#

Hmm, yeah that has the potential for adding a lot of payment intents during one session. Is there any other solution? I'm seeing a lack of documentation for using the payment element with a dynamic form instead of something like a cart where everything is fixed.

white patrol
#

Yeah unfortunately more dynmic use-cases like that can be tough with our current Payment Element. There still has to be some conversation between the client and server here to keep updating that subscription. One other thing I can think of is that you could make a PaymentIntent but have logic on your server that creates a subscription with the first month free once the other intent is paid

amber hollow
#

ohh the second option sounds like what I want - but does the payment intent still have to match the original when calling confirmPayment()?

#

or does this mean you don't need to create an intent to load the payment element?

white patrol
#

The latter, don't need a payment intent when loading the element

#

Or does the doc say different? I am more familiar with the other flows on that page and that is how they work.

amber hollow
#

oh I see, yeah sounds like you don't need a payment intent to load the element. that would be ideal for my situation. Is there a timeline for this feature? Also I should mention we are using connect in case that matters