#Jacob-subscription

1 messages ยท Page 1 of 1 (latest)

tacit yew
#

Hi there, is this question about billing portal or checkout? for context, the customer can't perform checkout from billing portal.

distant sleet
#

Sorry, mistake. Checkout sessions

#

I only want to let the customer purchase one subscription per organization. I have a unique org ID in the metadata

tacit yew
#

No worries, once the checkout session is completed, the customer can't use the same checkout session URL for repeated subscription purchase.

distant sleet
#

My fear is they generate two checkout session URLs, which has happened before

#

Do I need to make sure the previous session ended then?

tacit yew
distant sleet
#

Thanks, so just store whether they have an active session before generating a new link?

tacit yew
#

Yes you can do that, and you can also listen to customer.subscription.created event and then expire other pending checkout sessions if any.

distant sleet
#

Oh neat, that's the best solution

#

Thank you! Not sure where you are but didn't expect to get help at 10 pm EST ๐Ÿ™‚

tacit yew
#

Welcome, feel free to drop by when you need help!