#Miloszex
1 messages · Page 1 of 1 (latest)
not sure what you mean by "need to take somehow time of stripe server"
I need to pass unix timestamp right?
expires_at is just a unix timestamp in UTC yes
in UTC okay
great
thanks
and one more question When the session will expire will I be notified on webhook with event "checkout.session.expired" ?
I think so, I suppose you can test it quickly by setting an expires_at now in a test and seeing if you get an event in 30 minutes
thanks 🙂
hmm still have problem with it im generating timestamp
like
int(time.mktime(((datetime.datetime.utcnow() + datetime.timedelta(seconds=30)).timetuple())))
and it returns me
1686558603
it is wrong format?
stripe.error.InvalidRequestError: Request req_lpBuBeyY43HbAK: Invalid timestamp: must be an integer Unix timestamp in the future.
Seems like a valid timestamp, but it's in the past. Your logic is likely wrong
hm
strange because im taking utcnow time and even if I add 30 minutes to this its till wrong . So what time should i take? not UTC?
Yes, it needs to be UTC. Not really familiar with what library you're using there but clearly not working as you expect