#trueinviso-subscription-price-choice

1 messages · Page 1 of 1 (latest)

tired cloakBOT
shadow jackal
#

trueinviso-subscription-price-choice

#

@wooden onyx you need to ask which Price they want to pay first, once they choose you start a Subscription with payment_behavior: 'default_incomplete' and then confirm the underlying PaymentIntent on the Invoice client-side at that point

wooden onyx
#

So you're saying it can't be done? One step checkout seems like a pretty common use case for a lot of websites to prevent user drop off

shadow jackal
#

I

wooden onyx
#

I'm also not using stripe checkout

shadow jackal
#

I've never said it can't be done

wooden onyx
#

I'm using stripe elements

shadow jackal
#

I literally said how to do it

wooden onyx
#

Maybe I misunderstood

shadow jackal
#

1/ Ask for the Price.
2/ Create a Customer/Subscription for that Price
3/ client-side collect payment method details and have them start their Subscription that way

wooden onyx
#

right, so that means I can't do it all in one shot because the user has to select price before I can collect their payment info

shadow jackal
#

I don't really get what you call "one shot". Like you can have one UI that does this and as they choose a Price it makes an ajax call to your server to create what's needed and render the PaymentElement. It can all be on one screen

wooden onyx
#

this is the form I'm trying to build

#

ok, so that's what I'm asking, I can't render the drop in until they select a plan?

#

then what happens if they change plans? I need to async update the subscription that was created and re-render the drop-in?

shadow jackal
#

I mean you can, but it's more complex and not what I would recommend. I would recommend asking for their Price(s) upfront first yes because it would be drastically better. The UI you have is not going to scale well when you need to handle multiple payment method types, redirect flows, collecting information dynamically like their billing details or phone when required, etc.
So while you can do this, it's discouraged and requires a lot more work

wooden onyx
#

regardless of if you like the UI or not, my client has this requirement

frigid orbit
#

Hey, koopajah had to step out but I can help from here. So yes, this would involve your server making a new subscription and re-rendering the Payment Element with the new payment intent that is generated.

wooden onyx
#

Should I delete the one I created originally? Or does Stripe do a clean up on those?

frigid orbit
#

Yes delete the original one. Currently we don't clean up subscriptions like that. They can cancel after 24 hours of not receiving an original payment but that might interact strangely with if you set a default payment method for a Customer or something

wooden onyx
#

sounds good, thanks