#eoghanobrien
1 messages · Page 1 of 1 (latest)
It's up to you. So if the customer pays before the expiry window is up, then the session cannot be re-used. However, if the session remains unpaid, it can be paid by anyone before it expires. That may or may not be ideal with your specific integration. It's not recommended to use the same session (ie re-use the session) for multiple customers since the original customer may come back to the link and want to pay hours later. There's not really an issue with creating many sessions
If you want a shorter expiry window, you can specify that with the expires_at param
or even expire manually with our /expire endpoint
Okay, so I could create and reuse sessions that have more granularity, for example, I could tie it to a user in my database and perhaps tie it to a specific product/price - that way only the user the session was created for could use the session and they could only pay for the specific product it was created for
Yes exactly. And you could essentially handle this automatically if you use idempotency keys: https://stripe.com/docs/api/idempotent_requests
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
So that way if a customer goes to recreate a checkout session with the exact same options, the same session would be used
ooooo - me likey - that's awesome! thank you for the link - digging in now