#Aimer

1 messages ยท Page 1 of 1 (latest)

nova lanternBOT
vivid vine
#

๐Ÿ‘‹ happy to help

low ivy
#
$stripe = new \Stripe\StripeClient("sk_test_51FCCeXIWzZYVbxDQW0GWB9uWoDK7zIj88vY65qN8QYDbcfXz2j8BzkFqvGp2VJUqC2sJw17Hyw9lxPcWggRWWglo00YsXf22JT");
$customers = $stripe->customers->all([
  'limit' => 3,
]);
foreach ($customers->autoPagingIterator() as $customer) {
  // Do something with $customer
}
#

for this code

#

it fetch 3 records?

vivid vine
#

no it fetches all the customers

low ivy
#

whats the limit stands for

vivid vine
#

but it will make an API call to Stripe for each 3

low ivy
#

ahh thanks

#

may i know whats the reason for this

#

is it bad

#

for making a bulk response

#

from stripe POV

vivid vine
#

you can set the limit to whatever you think is best for your application

#

usually it's a matter of a trade off between how fast is the network response and how time-sensitive is the processing

#

we usually recommend between 10-100