#.saberkhan-expand
1 messages ยท Page 1 of 1 (latest)
Hi! Let me help you with this.
What are you expecting to get, and what are you actually getting? Could you please share the Request ID req_xxx? https://support.stripe.com/questions/finding-the-id-for-an-api-request
cs_test_b14HCNihLZaanwqzlISthfXqm6Phq2NafZ0PGmYhf28ZBkulLZPzUSxqfL
The generated product does have the description you provided: https://dashboard.stripe.com/test/products/prod_OK1dKx23V1yKKS
I entered input for both ...product_name and ...production_description. The output of ...product_description should appear as "All Hearts Stethoscope" and output of product_name should appear as "Stethoscope". Look at the inconsistencies in the output.
Let me give you a screen shot
The name and the description were populated correctly on the Product object. However, we don't expand the Product object in the response, but show the Product ID instead: product: "prod_OK1dKx23V1yKKS"
That's why you don't see it in the response.
You can expand it in the response if you need to: https://stripe.com/docs/api/checkout/sessions/object#checkout_session_object-line_items-data-price-product
Which object I am expanding?
in checkout session
Please share the name of the object that i need to exapnd so I can see both ...product_name and ...product_description fields in the response.
line_items.data.price.product
The product object will contain the name and the description.
Happy to help!
line_items.adjustable_quantity.enabled and its related fields are only for configuration. We do not see the response of these fields in api call. Correct?
Yes
What you have here: https://stripe.com/docs/api/checkout/sessions/object
That makes sense.
Is there a rule of thumb, how many expand should I call as it may slow the api response?
Hi there ๐ jumping in as my teammate needs to step away soon. No, we don't have recommendations on limiting requests that use expand. They do increase how much time it takes to respond to the request, so I recommend only using them where needed. Otherwise the other limit to keep in mind is that we only allow you to go 4 layers deep with expand.
.saberkhan-expand
Can you elaborate? I don't think I understand the difference you're referring to.
Is deep expand faster than regular expand?
I don't know what that means, we have one type of expand.
Create checkout session, I have expanded "line_items.data.price.product" but in response I do not see the "id": "prod_OK2Pl1HW7CvR5L" , only "null" appears for the default_price?
cs_test_b132GLjFxcTz2RqI9OozHNhdHzwk6ShEP9Enblr0XMfCnZ9DoOsKTrdDY5
Can you share the output of the response? default_price should be null for that Product as it was created in an adhoc fashion by your request to create the Checkout Session, and doesn't have a default price set.
"amount_tax":300,
"breakdown":{
"discounts":[
],
"taxes":[
{
"amount":300,
"rate":{
"id":"txr_1NXCc2CjwmDvqQqqE6KYjifm",
"object":"tax_rate",
"active":true,
"country":"US",
"created":1690158418,
"description":"Local tax rates apply",
"display_name":"State of Texas tax rate",
"effective_percentage":8.25,
"inclusive":false,
"jurisdiction":null,
"livemode":false,
"metadata":{
"8.25":""
},
"percentage":8.25,
"state":"TX",
"tax_type":"vat"
},
"taxability_reason":null,
"taxable_amount":3631
}
]
}