#BarrelRider

1 messages ยท Page 1 of 1 (latest)

weak nimbusBOT
boreal eagle
#

hi! well the normal way would be to use /v1/subscriptions instead https://stripe.com/docs/api/subscriptions/list so you'd pass ['customer' => 'cus_xxx', 'status'=>'active'] to that to get all active subscriptions for that customer; and then repeat the call for trialing.

floral goblet
#

Oh I see, I was hoping that I could get em all in one call. That's very helpful, I'll do that, thank you!

boreal eagle
floral goblet
#

oh even better thanks ๐Ÿ™‚

#

Oh I am getting Queries cannot have a mix of AND and OR so I guess I will just go with 2 calls

boreal eagle
#

ah ok, makes sense. It's mostly because it would be hard to optimise the underlying database to support fully arbitrary queries unfortunately

floral goblet
#

that is absolutely fine, so long I know I am using that the right way I have no issues with 2 queries

#

๐Ÿ™‚

#

also in regards to the same thing - I am doing that toc heck in my system if user already has an active subscription - I assume I have to do that on my side? I can't stop the user from multiple subscriptions via stripe? it just that for my system it makes no sense to have multiple subscriptions.