#.saberkhan-expand

1 messages ยท Page 1 of 1 (latest)

river vortexBOT
mighty echo
#

Hi! Let me help you with this.

zenith field
#

cs_test_b14HCNihLZaanwqzlISthfXqm6Phq2NafZ0PGmYhf28ZBkulLZPzUSxqfL

mighty echo
zenith field
#

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

mighty echo
#

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.

zenith field
#

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.

mighty echo
#

line_items.data.price.product

#

The product object will contain the name and the description.

zenith field
#

ok

#

Works. Thanks a lot!

mighty echo
#

Happy to help!

zenith field
#

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?

mighty echo
#

Yes

zenith field
#

ok

#

Is there a way to know which fields we are supposed to see in the response?

mighty echo
zenith field
#

That makes sense.

#

Is there a rule of thumb, how many expand should I call as it may slow the api response?

grim heart
#

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

zenith field
#

ok

#

Is nested expand faster than a regular expand?

grim heart
#

Can you elaborate? I don't think I understand the difference you're referring to.

zenith field
#

Is deep expand faster than regular expand?

grim heart
#

I don't know what that means, we have one type of expand.

zenith field
#

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

grim heart
#

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.

zenith field
#

"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
        }
     ]
  }

},
"url":"https://checkout.stripe.com/c/pay/cs_test_b132GLjFxcTz2RqI9OozHNhdHzwk6ShEP9Enblr0XMfCnZ9DoOsKTrdDY5#fidkdWxOYHwnPyd1blpxYHZxWjA0SzV1UTJGb3JoQXN0VHR0bGF0d3NAUXJCYGdhZz1uMHBgZ2A1RGt3V29CUENrd2B1NWh%2FY3VHRFBcXFNoUmt2TnFTYXVAaHNVN1FmV19fZzFBU2xma01MNTU0aDBUbnBwQicpJ2N3amhWYHdzYHcnP3F3cGApJ2lkfGpwcVF8dWAnPydocGlxbFpscWBoJyknYGtkZ2lgVWlkZmBtamlhYHd2Jz9xd3BgeCUl"
}
#1