#divya_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! We typically respond in a few minutes, but in some cases we might need a bit more time (e.g., server's busy, you've got a complex question, etc.).
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can 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/1260182100922073099
đ Have more to share? Add details, code, screenshots, videos, etc. below.
Can you share the requestId you are making and an invoice Id that you were expecting to get ?
Is it possible to answer my question without them
I have a invoice generate on july 1 and I am trying to fetch it by using
invoices = (await new InvoiceService().ListAsync(new InvoiceListOptions
{
ExtraParams = new Dictionary<string, object>() { { "status", "open" } },
Created = new DateRangeOptions
{
LessThan = DateTime.UtcNow.AddDays(-7)
},
Limit = 100
})).ToList();
The invoice should be returned.
As this is an unexpected behavior, you need to share with me concrete example to narrow better.
I verified the logs in stripe, It is showing something as below
Request query parameters
{
"limit": "100",
"status": "open",
"created": {
"lt": "1719913318"
}
}
but lt should consider the milliseconds time right, then only it will retrive the data
https://api.stripe.com/v1/invoices?status=open&created[lt]=1719913318
this is the request created while trying to fetch from the API
https://api.stripe.com/v1/invoices?status=open&created[lt]=1719912118323
this request is fetching the required information
I verified both of these URL's from postman and got this conclusion, am I doing anything wrong here.
Can you share an invoiceId that is supposed to be returned please ?
It's a test account invoice
Your timestamp (1719913318) is Tue Jul 02 2024 09:41:58 GMT+0000
That invoice was created 2024-07-09 05:23:17 +0000
Seems expected that it's not returned given those 2 dates
then why is this showing wrong info under details
Ah, I missed the test clock attachment. Not sure if/how that works, checking
OK, you'll need to pass the customer parameter to your API request: https://docs.stripe.com/api/invoices/list#list_invoices-customer
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The customer has the clock association, so the API acknowledges that and then returns objects that reflect the test clock
but even with coustomer parameter it's the same behaviour
The context here is to fetch invoices irrespective of customer.
Do you have an example request?
Not supported today I'm afraid
https://api.stripe.com/v1/invoices?status=open&created[lt]=
can you try this with both the timestamps, you will find the difference
1719889244000 & 1719889244