#Gkiokan-laravel

1 messages · Page 1 of 1 (latest)

half ruin
#

Hello! Can you clarify what you mean by "price is determined"?

gusty pasture
#

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

half ruin
#

By default we only return the active ones, so you have to explicitly pass in active: false to get the archived ones

gusty pasture
#

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)

half ruin
#

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

gusty pasture
#

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.