#LucaDaniele
1 messages ยท Page 1 of 1 (latest)
Hi there, yes you can specify a expire_at (https://stripe.com/docs/api/checkout/sessions/create#create_checkout_session-expires_at)
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Do I have to specify only the seconds (example 3h = 10800s) or the date when it has to expire in seconds (example today at 12:00PM = 1675771200)?
It's a epoch timestamp, not duration
Ok thank you very much
Hi sorry for coming back, I'm generating this timestamp 1675846123702 and when converting it to human date it gives tomorrow correctly, but when generating the checkout I get the following error: Invalid timestamp: can be no more than five years in the future
๐ taking over for my colleague. Let me catch up.
1675846123702 this is in milliseconds we only take timestamps in seconds
so you need to divide it by 1000
Ok thanks, fixed it ๐
That's all, thank you
would you mind me closing the thread then?
Last question I was thinking about now, timestamp doesn't have any timezone ofc (I'm in GTM +1 and if I convert the timestamp I get the +0 hour), does Stripe automatically manage the timezone when a user opens the link or I need to add like 25h so I compensate the missing timezone if I want to expire the link after a day?
the timestamps are in GMT
let me know if you need any more help
you can get the utc now time and add 24hrs
I think that would be easier
Yeah right, thanks for the hint