#andrea-skuola-subscription
1 messages · Page 1 of 1 (latest)
Hi there!
With the new search API you can find objects based on their metadata, including subscriptions
https://stripe.com/docs/search
ok, and when I do this $subscriptions = $stripe->subscriptions->all(['customer' => $userStripeId, 'status' => 'active']); can I concat more statuses?
No the list API endpoint works with only one status. But you could use the search API I mentioned earlier to search for subscription with status:"A" OR status:"B".
ok thanks
i'm getting this error: Attempted to call an undefined method named "search" of class "Stripe\Service\SubscriptionService".
should I update Stripe library?
Most likely. You are using the dotNET library?
If so, you need at least version 39.101.0
https://github.com/stripe/stripe-dotnet/blob/master/CHANGELOG.md#391010---2022-03-29
i'm using PHP via composer