#jco_code
1 messages ¡ Page 1 of 1 (latest)
đ 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/1388115143845478554
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
Hi
are you talking about this: https://docs.stripe.com/api/products/object?api-version=2025-05-28.basil&lang=curl#product_object-default_price
yes
by default it's just a string with a Price ID (price_xxx), unless you use expand and in this case it would be a full Price object.
if you want to learn more about expand: https://docs.stripe.com/expand
Can I expand on retrieve? The docs say you cant.
As in they say there are no params accepted by it.
Can I expand on retrieve? The docs say you cant.
of course. where did you see that it's not possible?
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Am I just not understanding the API docs? I take the params having nothing as in I cannot pass things like expand to it?
I don't understand the issue. you can absolutely do something like this:
const product = await stripe.products.retrieve('prod_xxx', {
expand: [ 'default_price' ]
});
I recommend reading this giude about expand: https://docs.stripe.com/expand
In the documentation for retrieving a product, it says there are no parameters, the expand is a parameter you can pass to a request to expand objects inside the request as I understand it. So when the docs for the api retrieval of products says there are no parameters, I assumed that expand wouldn't work?
got it, but expand works on all endpoints.