#illidan_ty

1 messages · Page 1 of 1 (latest)

high brookBOT
cyan orbit
#

hi! you'll just have to implement some backoff algorithm and slow down the requests.

api where i could just add multiple customer ids in one api call?
no

opal garden
#

Is there a payment option to exceed the api call rate limit?

cyan orbit
#

not sure what you mean by a payment option?

opal garden
#

This is my code:
const companyData = await Promise.all(
customerIds.map(async (id) => {
const { email } = await stripe.customers.retrieve(id);
const emailValue = email ? [email] : ["Email Not found"];

    return [emailValue];
  })
);

Now, if i have about 15 customerIds in the customerId array, The api works, if its more than that, then it throws a stripe errror.
i have about 80 customer ids to go, How do i fetch their data?

cyan orbit
#

I would not use promise.all(that multithreads it right?) , just do it in a sequential loop and you're unlikely to hit any limits.

opal garden
#

Let me try it. Be back in a sec