#Abhishek-Invoice
1 messages · Page 1 of 1 (latest)
Hi there, you can use the Invoice List API https://stripe.com/docs/api/invoices/list
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
i am using same api
but it gives only 10 values if no parameter is given
what param should i send
you can use the limit param to specify the number of objects to be returned (max 100). and you should also use ending_before or starting_after for pagination if there are many invoice objects.
okay
can you pls tell what values can we provide in ending before and starting after
Hi, I'll step in for Jack
Please refer to the link here for ending_before or starting_after details: https://stripe.com/docs/api/pagination
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
This is typically the object ID such as in_xxx
i tried giving 100 as limit it still gives me 10 output. But if we provide customer id it gives all invoices available for customer
so on what factors it is sending me 10 values only
Can you share the request ID (req_xxx) for the one that you limit to 100? Here’s how you can find it: https://support.stripe.com/questions/finding-the-id-for-an-api-request
wait limit 100 it is giving me right output parameters gone wrong
but i haven't got starting after and ending before
can you share sample values as please for testing
or any format
For example, if your current list of 100 entries has the last object returned as in_1, and you want to retrieve the next 100 entries. Then your next request should include starting_after=in_1 , so that it will fetch the next 100 entries after in_1
ending_before and starting_after simply are cursor of object ID to use in pagination
object id refers to id in each json output. Right?
yup! in the case of invoice object, its ID will be in_xxx
if yes lets say we use invoice id and then i am retrieving 10 invoices and want another 20 invoices then i need to provide invoice id to starting after field
how can we make it dynamic
which language are you using?
We have .net library for auto pagination. You may refer to the example here: https://stripe.com/docs/api/pagination/auto?lang=dotnet
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
No problem 👍