#jeffchan
1 messages ยท Page 1 of 1 (latest)
hello! we don't have any such feature, you'll need to implement the relevant logic to prevent that in your app
Thanks! It's a bit tricky to implement this since we're using CheckoutSession, so a user might generate two CheckoutSessions and complete both, resulting in duplicate subscriptions.
Curious if you know how have other Checkout users gone about this? Is it to implement webhooks and then refund one of them (seems a bit inelegant) ?
that wouldn't work out well. You need to keep in mind that Stripe doesn't refund the Stripe fees. So you're going to be negative the Stripe fee for the original payment
Couldn't you validate if the Customer already has an active Checkout Session?
Hmm, can you say more about your suggestionn re. checking if customer has active CheckoutSession? Basically I need to keep track of the CheckoutSession that we've created per customer, and ensure at any given time, we only have one CheckoutSession per user?
yep, that's what i had in mind
or alternatively, when the Customer tries to generate a new one
check if there's any previous (uncompleted) ones, and expire them : https://stripe.com/docs/api/checkout/sessions/expire
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
great, thank you! (i'm a former stripe, sending my ++ to you) ๐