#Gkiokan-laravel
1 messages · Page 1 of 1 (latest)
oh my bad
I ment archived*
each Product have 2 prices (month + year). But we have added 2 more prices (month + year) and archived the old ones
Now I get all prices from the API. Thats fine, but I need to filter which are active and which ones are archived to disable them in our app
The Problem is that I thought active or livemode would be a hint but they are always same on all prices
I'm not experienced with laravel cashier, so I don't know the best way to pass that in, but if you were to make the reqeust directly through our API you'd set active: false to get all the archived prices (https://stripe.com/docs/api/prices/list#list_prices-active)
By default we only return the active ones, so you have to explicitly pass in active: false to get the archived ones
The response that I show you on the screenshot is just a collection of the direct response from API.
Strangly there should be some of them active:false but all are active
At least thoose must be shown as archived at all
lemme double check the reponse
I use the Stripe PHP SDK with this method $stripe->products->all();
One of the price ID for you if you want to double check it price_1LAuxIHa5WPIKK5Iulk4owom (archived one)
price_1LIcCMHa5WPIKK5IYqw8OPID (active)
Yeah, so as I mentioned you need to pass in active: false if you want to check for archived prices or products
We only return the active ones by default, so it's expected you're only getting the active ones back in your request since you're not passing in active: false
Ok I will try that param and the PHP SDK of Stripe. But there is still one confusion. I have a total of 9 prices and all are active on this response. This shouldn't be the case. At least 4 of them are archived.
I will give it a shot with the params and see if there is another request.