How can I get more than 100 customers? How can I loop through all customers in Stripe using PHP? In short I am trying to get all the active customers who are subscribed. If I can access all customers in a loop I "may" be able to get all active subscribers this way. I am sure there are better was to get all ACTIVE subscribers and if you can help me that would be awesome, but at the very least I need to find how to get more than 100, to get all in a loop. Thanks
The line I am using $customers = \Stripe\Customer::all(array("limit" => 500));
\Stripe\Stripe::setApiKey($stripe['secret_key']);
///NOTE THE CODE BELOW only outputs 100 - -WHY?
$customers = \Stripe\Customer::all(array("limit" => 500));
$Var = \Stripe\Customer::retrieve("cus_exampleID");
exit();
for($i=0;count($customers['data']) >$i; $i++ )
{
if($customers['data'][$i]['subscriptions']['data'][0]['items']['data'][0]['plan']->active)
{
echo "NAME: " . $customers['data'][$i]['sources']['data'][0]->name;
echo "<br>";
echo "ID: " . $customers['data'][$i]['subscriptions']['data'][0]['items']['data'][0]['plan']->id;
echo "<br>";
echo "Plan Name: " . $customers['data'][$i]['subscriptions']['data'][0]['items']['data'][0]['plan']->nickname;
echo "<br>";
echo "Active: " . $customers['data'][$i]['subscriptions']['data'][0]['items']['data'][0]['plan']->active;
echo "<hr><br>";
}