orders->page($orderId); while ($page->hasPrevious()) { foreach ($page as $order) { echo $order->id; } $page = $page->previous(); } // iterating backwards using the iterator by passing iterateBackwards = true // in php 8.0+ you could also use the named parameter syntax iterator(iterateBackwards: true) foreach ($mollie->orders->iterator(null, null, [], \true) as $order) { echo $order->id; } } catch (\Mollie\Api\Exceptions\ApiException $e) { echo "API call failed: " . \htmlspecialchars($e->getMessage()); }