#mancharface_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1276577355539677268
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
In looking at the request, the gte value is being converted to a timestamp, so it looks like that's happening on Stripe's side? I don't need to do that?
It wants the Time since the Unix epoch which is an integer that represents seconds since the Unix epoch. Are you maybe passing in a string instead on accident?
Sorry, let me clarify. I'm using the python Stripe library. When I call stripe.Transfer.list() and pass in a timestamp as a value for created={"gte":timestamp_here}, that doesn't work. I have to pass in a datetime object there to get it to work. Does that make sense? Or am I misunderstanding?
Again, no problem here because I can get it to work. Maybe I'm conflating two things--the API docs and trying to work that in to the python library.
Let's back up. The request went through. What do you mean when you say it's not working?
This code works. resp = stripe.Transfer.list(destination=account_id_here,limit=100,created={"gte":datetime.now() - timedelta(days=42)},stripe_version="2024-06-20") it works.
This code does not work.
resp = stripe.Transfer.list(destination=account_id_here,limit=100,created={"gte":1720799991492,stripe_version="2024-06-20")
The latter does not even hit Stripe so I can't see the request in the Stripe logs. The only difference is changing the gte value from a datetime object to a timestamp.
And I guess I expected to have to send in a timestamp here and not a datetime object.
Weird that the datetime object worked at all, but maybe Python or Stripe is being helpful here? Anyway, I still don't know what you mean when you say it isn't working Like, you said "the latter doesn't even hit stripe", but what are you actually seeing in the console?
When I run that, it acts like the request just returns nothing. resp.data is an empty list. But then I can't see the request in Stripe's logs anywhere--either failed or successful. It's like it's never getting there.
At this point I'm just gonna move forward then. It works with a datetime. Was just hoping to understand and reconcile that against the docs. I'm good here. I'm sorry to have troubled you all with something that I can actually get to work anyway.