#annabanana-session-expiry
1 messages ยท Page 1 of 1 (latest)
Hey @covert laurel ๐
give me a moment to look into this
following up on the above,
Yes you can set session's expiry time using expires_at parameter when creating a session. It can be from 1 to 24 hours after the checkout session is created.
By default, the expires_at timestamp is set to 24 hrs from creation
https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-expires_at
oh coool! thank you. ok follow up question, what if we want to close the session once they enter a payment method so they can't reenter
I'm going to assume there's no option to stop a user from deleting their payment method and account because that's their rights/privacy rights
@covert laurel Can you elaborate on what youre trying to prevent here? A customer should only be able to use a Checkout session once, so wouldnt be able to enter new payment details unless you set up another session for them
What do you mean by deleting account in this context?
Reading again, it sounds like you might be talking about the customer portal for managing subscriptions, rather than Checkout. Do you have a particular example we can look at to keep things grounded?
I've been able to go back into the session after i close the browser
i do.. what's the best way to show you
The ID of the session object here would help, or a request ID from creating it
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
yes! it's the customer portal
trying to see if i can get this session to expire by hours and once they enter a payment method
whichever comes first..