#nukesforbreakfast_unexpected

1 messages ยท Page 1 of 1 (latest)

woven kindleBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1347294008090820639

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

quiet herald
#

hey @white warren, glad it picked you since we were discussing this previously.

#

๐Ÿ‘‹

white warren
#

Hello! I think Products created via product_data are expected to be visible in the Dashboard, but Prices created using price_data aren't. That said, do you have an ID of one of the Products in question so I can take a look?

woven kindleBOT
spiral cloud
#

Hello Rubeus is stepping out but I can take a look, thanks for the ID

quiet herald
#

req_etZaAGDFDaSA9h

white warren
#

So that Product was created when you made a request to /v1/prices. Requests to create a Price using that API will, as far as I know, always show up in the Dashboard, and so will Products created that way as well.

#

I dug up my previous tests and confirmed that Products created using product_data and Prices created using price_data don't show up in the Dashboard as long as you don't actually use the Product or Price APIs directly. Specifically, my tests were performed by specifying price_data and product_data when creating a Checkout Session. Products and Prices created that way aren't visible by default in the Dashboard.

quiet herald
#

is there a specific API version where that is the case?

white warren
#

I don't believe so, but let me check...

#

Doesn't seem to be, no.

quiet herald
#

ok, so this is specific to creation of a checkout session

white warren
#

No, that's just what I tested with. The same behavior should apply as long as you're not using the actual Product or Price APIs, like /v1/prices in the example Product/Price you provided above.

#

Prices created using price_data when creating a Subscription, for example, should also not be visible in the Dashboard.

quiet herald
#

Ahhhhh, I think I understand now. One moment.

#

this might make me throw away all the code I just wrote, lol.

#

OK, so we still need a product in the subscription or subscription schedule case, as the price_data in both locations requires a product ID.

white warren
#

Another way to think about it is that if you use the Product/Price APIs directly you're telling us you want to explicitly create a Product/Price to use separately later (because creating a Product/Price and doing nothing with it would be pointless). Thus, we show that Product/Price in the Dashboard so you can see the thing you created. But in the context of doing something else, like creating a Checkout Session or Subscription or something, if you specify ad-hoc Product/Price data there we know it's only intended to be used for that specific thing, so we hide it in the Dashboard.

#

Yeah, Subscriptions not having product_data is a limitation. You do need a Dashboard-visible Product for those.

quiet herald
#

OK, so I'll still have products littered in my test mode dashboard regardless. Alright.

#

One other thing I noticed to that end is that I can delete a product with a price in my dashboard, but I can't do the same in the API. Is that expected? I saw the dashboard was hitting dashboard.stripe.com instead of api.stripe.com when doing that.

white warren
#

You can only delete a Product/Price if it's never been used. The Dashboard I believe has slightly different behavior than the API in this regard, but I don't know the specifics. @spiral cloud are you familiar with this?

quiet herald
#

It seems like I can delete a product if it has no associated prices. There is no API documented to delete a price.

spiral cloud
#

Does deleting the product also delete its assosciated prices? That may at least let you get the bulk of them if so?

quiet herald
#

If I do it through the dashboard buttons, it seems to delete the price and the product

#

however, if I try via the products API, it gives me an error that it cannot be deleted because there is a price associated with it.

spiral cloud
#

Does that include if the prices are set to inactive?

#

No dice when I tested that ๐Ÿ˜ฆ

quiet herald
#

yes: tripe._error.InvalidRequestError: Request req_R2y9ickEpcLhfr: This product cannot be deleted because it has one or more user-created prices.

spiral cloud
#

I am not seeing a good way to do this. If you reach out to our support team with a list, they may have some way to do something on our side, but I haven't been able to confirm that so that might also not pan out.

quiet herald
#

nah, this is going to be an ongoing thing as in nonprod I have a lot of automated integration tests that will create products/prices.

#

I think now though based on the price_data revelation with subscriptions, I can instead just create some minimal amount of products to achieve my goals.

#

I just need to refactor the code to use this approach now.

#

it would be nice though to have api.stripe.com have feature parity with dashboard.stripe.com in these areas. It isn't the first time I was able to do something in the dashboard, but I wasn't able to in the actual stripe API.

spiral cloud
#

Yep, I'll create a feature request or add to the existing one if it exists

quiet herald
#

where's the correct place to make feature requests for more Connect embedded components?