#lukez_best-practices

1 messages ยท Page 1 of 1 (latest)

uneven ferryBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1308535448200679435

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

modest ravenBOT
dreamy drum
#

* killing == expiring lul

paper flume
#

Hi ๐Ÿ‘‹ expiring sessions is probably the best option coming to mind.

The only other one that I think may work, depends on how you represent guilds within your Stripe flow. Any chance the guild is associated with Customer objects? If so, this setting for limiting Customers to a single subscription may help, though admittedly I'm not sure offhand how it works if someone is already in the middle of completing a Checkout Session when the single subscription is created:
https://docs.stripe.com/payments/checkout/limit-subscriptions

dreamy drum
#

hey back ^^

Any chance the guild is associated with Customer objects
No, because a customer can have multiple subs

Also, I'm currently giving a user 15 minutes to complete the checkout and no one else will be able to create a checkout session too in that guild.

#

So you, would recommend my new idea of storing checkout sessions and expiring them if anyone in the guild completed one?

paper flume
#

Yeah, because if you aren't using the guild to somehow populate a field that can be used with our list endpoint for Checkout Sessions:
https://docs.stripe.com/api/checkout/sessions/list
then I don't think there is a good way for you to retrieve the sessions you'd want to expire from Stripe.

So tracking those on your end and expiring them as needed sounds like the best path probably.

dreamy drum
#

Guilds are not really integrated in my stripe flow (besides metadata on checkouts and subs)

paper flume
#

Yup, I think that needs to be tracked on your end then.

dreamy drum
#

okey FeelsDankManThumbsUp

Thanks mate ^^