What's your biggest current challenge? Have your say in Community Polls along the right column.
Our Partner & Developer boards on the community are moving to a brand new home: the .dev community forums! While you can still access past discussions here, for all your future app and storefront building questions, head over to the new forums.

Weight-based issue with custom line items in Shopify Checkout API

Weight-based issue with custom line items in Shopify Checkout API

bansikakadiya
Shopify Partner
1 0 0

I'm experienced with weight-based calculations in the Shopify Checkout API. 

Specifically, when I pass a weight value of 5000 grams in a custom line item using the Checkout API, the weight shows as 0 grams in the checkout.

I've double-checked that I'm using the correct field name (grams) and that the value I'm passing is a valid integer representing the weight in grams.

I've also tried passing different weight values for the customs line item, but the weight always shows as 0 grams in the checkout. I suspect that there may be a limitation or error with the weight-based calculations in the Checkout API.

I've also attached a screenshot that shows the weight-based issue in more detail (https://d.pr/i/2RM35V ). As you can see, the weight value is being passed correctly in the API request, but it's not being reflected correctly in the response object.

shopify_api version: 2023-04
Ruby version: 2.7.0
Operating system: Ubuntu

Replies 0 (0)