#daanOnMac-subscription

1 messages · Page 1 of 1 (latest)

sharp dust
#

Hi! How are you implementing Stripe? With a Checkout Session or PaymentIntent+PaymentElement or something else?

sturdy python
#

with custom flow, so Payment intent

sharp dust
#

Got it. Then yes, you would need to know whether the user wants a subscription or a one time payment before showing the payment form.

sturdy python
#

any alternatives?

sharp dust
#

So you would like to display the PaymentElement, and on the same page some king of toggle to switch between a one-time payment and a subscription?

sturdy python
#

Yes, exactly. My priority is to have a toggle to switch between payments

inner bloom
#

Yes the payment element doesnt currently support dynamically swapping out the payment intent, but we're working on improving this.

#

Currently, you'd need to re-initialize the payment element with the new PI client secret if you were switching from a single payment to paying a subscription invoice

#

I'd suggest deferring rendering the payment element until after that choice is made to avoid the thrashing here

sturdy python
#

Thank you all

inner bloom
#

NP!