The price of the product changed unexpectedly using Shopify's AJAX Cart API

Topic summary

Unexpected inconsistency in Shopify’s AJAX Cart API price units between endpoints.

  • Context: When adding an item via add.js (adds a product and returns line item/cart data), the price value used to be the product’s price multiplied by 100 (i.e., in cents). The cart.js endpoint (returns the cart object) still returns price as 100x (cents).

  • Reported change: add.js appears to now return the price without the 100x multiplier (i.e., in dollars), while cart.js continues using 100x. This creates mismatched units between endpoints.

  • Evidence: Two screenshots are provided comparing the API responses (images central to illustrating the discrepancy).

  • Key questions raised: Is this a temporary/interim update to the AJAX Cart API? Can Shopify provide advance notifications for such changes?

  • Status: No confirmed explanation or resolution in the thread. The issue remains open, with a request for clarification on intended behavior and communication of API changes.

Summarized with AI on December 30. AI used: gpt-5.

Previously, when adding a product to the cart using the add.js endpoint of Shopify’s AJAX Cart api, the value in the price field of the returned cart information was the original price multiplied by 100. However, the price value retrieved by the cart.js endpoint remains 100x. Is this an interim update to the AJAX Cart api? Wouldn’t it be possible to receive notifications about updates in advance?

1 Like