#daanOnMac-subscription
1 messages · Page 1 of 1 (latest)
Hi! How are you implementing Stripe? With a Checkout Session or PaymentIntent+PaymentElement or something else?
with custom flow, so Payment intent
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.
any alternatives?
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?
Yes, exactly. My priority is to have a toggle to switch between payments
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
Thank you all
NP!