Hi everyone,
I’m encountering an issue while using the Storefront API to generate carts, and I’d appreciate any insights from the community.
Here’s the scenario I’ve observed a few times:
- The price of an item is, say, $10.
cart.cost.subtotalAmountcorrectly shows $10.cart.cost.totalTaxAmountshows some tax amount, e.g., $2.- However,
cart.cost.totalAmountis not the sum ofsubtotalAmountandtotalTaxAmount. For example, instead of $12, I’ve seentotalAmountbe something higher, such as $15.
My expectation is that cart.cost.totalAmount would be the sum of cart.cost.subtotalAmount and cart.cost.totalTaxAmount. This discrepancy suggests that there’s an additional fee or adjustment coming into play, but I can’t find any reference to it in the cart data returned by the API.
My question:
Are there any other factors or components (e.g., shipping fees, additional adjustments, discounts, or Shopify app fees) that might contribute to cart.cost.totalAmount? If so, where should I look in the API response or settings to identify these moving parts?
Any guidance on understanding this calculation or troubleshooting these cases would be greatly appreciated!
Thanks in advance for your help!