#jonwaldstein
1 messages · Page 1 of 1 (latest)
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.
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?
Yeah, or ideally not event show the Payment Element until they've made a selection.
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.
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
We do also have this beta flow that allows you to create a subscription after collecting CC info. So that could mean you display whatever on your frontend and only create the subscription after they've mad some choice https://stripe.com/docs/payments/accept-a-payment-deferred?type=subscription
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?
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.
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