#Hamze-request-time
1 messages · Page 1 of 1 (latest)
I just asked this to toby but I realized that it could take a long time for requests with more than 1000 customers #dev-help message
What is the context in which you are loading all 1000?
I am trying to understand the context and what might be an acceptable solution
we are a SAS and we need to check all our users for no replication, get ids, moreever
my request is in 1900ms
with the repagination will call it more than 10 times
Right, in this case it sounds like the focus would be more on reducing the number of times you need to fully re-request the list of users from us.
yes
Is that 1900ms for one 100 customer call now or all of your customers now?
just for a first hundred customers
This should only be a one-time activity, or at least rare, right? it sounds like it should be OK for it to take a while.
are you including any expansion in those requests?
we have more than 1000 customers and this will take a long time
limit 100 for request
can you share an example request ID?
req_123 https://stripe.com/docs/api/request_ids
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Can you check the headers for that response?
There should be a request ID in the form of req_123 that will help us look further in to this request
Apologies, I said "request" not "response" originally
Can you check the "response"?
Thank you.
we need to do a repagination with this request that will be called more than 10 times, because the call limit is 100 users
how often do you need to perform this task? it's just a lot of information you're requesting.
what exactly are you looking for when you do it?
every time a new registration is made and when the user enters the application
I need to check if there is a duplicate user and get the specific customer id
I check the email of the user logged into the application, I check if this user is in the stripe and get his id
you can filter that customer list API by matching emails
email=user@site.com
and you'll only have customer objects with that matching email
what do you mean>?
I will control billings by stripe
We manage our billing and subscriptions at stripe
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
if you're matching on email, you dont need all customers, you only need customers with the same email address, right?
For this we will register customers that will be in the stripe but the endpoint to return users only returns a maximum of 100 at a time I will do a repagination on this endpoint, to call 100 out of 100 until I sweep all the customers but this takes a long time
To check which ones are in range, don't let duplicate emails and get the customer id logged into my app during a request
you wont be able to retrieve and inspect 10k customers "quickly" during a synchronous new users registration, that's just not possible. so i'm trying to help you distill what you actually need during that process to make your api calls more efficient.
are you just trying to find existing customer object with that same email address?
not only that i also need to get information from a specific user with just the email
I need this information to verify a customer's subscription, whether it's active or not.
Right, the list function will give you a list of Customer objects so they will have the relevant info
Including when you filter by email
Can't do it faster?
If you filter by email this will be a single request
because I will have to call the same endpoint multiple times
https://api.stripe.com/v1/customers this endpoint filters only every 100 users, in case of 1000 users will I have to call it 10 times?
It would filter all 1000 users
A limit on the number of objects to be returned, between 1 and 100
You would only need to page that call if there are more than 100 customer objects with the same email
Correct, that is the maximum number of objects to be returned. It will still filter through all of your customer objects.
alright thank you very much
@molten pagoda try it out, please
to you list request, add a parameter email=test@example.com
try it for a user you know exists
and a fake one that doesnt
it filters all objects in your account and returns a paginated result after the filter is applied
Perfect, thanks very much