500 Errors on Cart AJAX API in New Shopify Markets (2025) Using /en-fr/, /en-sg/, etc

Hi all,

We’re encountering a critical issue with the Cart AJAX API on stores using the new 2025 Shopify Markets setup. This appears to be a platform-level bug affecting multiple themes, including Horizon.

:red_exclamation_mark: Problem

AJAX cart requests (add, update, change, remove) return a 500 Internal Server Error when made from storefront URLs with country-language subfolder structures like:

  • /en-fr/
  • /en-sg/
  • /fr-ca/

These same requests work fine when made from simpler market paths such as:

  • /en/
  • /es/
  • /de/

:magnifying_glass_tilted_left: Details

  • Affected endpoints: /en-sg/cart/add.js, /en-sg/cart/update.js, /en-sg/cart/change.js, etc.
  • This issue occurs regardless of the theme, including on Shopify’s official Horizon theme.

In Horizon, the cart uses /en-sg/cart/add.js for adding products, which works as expected. However, when updating quantities, Horizon uses the /en-sg/cart/change (without .js), and this also returns a 500 error when accessed from a country-language market URL.

So, both the documented (.js) and undocumented endpoints are affected, depending on the operation being performed.


:test_tube: Reproduction Steps

  1. Setup the new Markets 2025
  2. Visit a storefront using a market URL like /en-fr/ or /en-sg/ (or whatever you setup in step 1)
  3. Try to add, update, or change a cart item via AJAX using the corresponding endpoint
  4. A 500 Internal Server Error is returned
  5. Repeat the same action on /en/, /de/, etc. – no error

:puzzle_piece: Suspected Cause

This looks like a backend regression tied to the new Shopify Markets architecture introduced in 2025. It closely mirrors a similar bug from last year that affected the .js Cart endpoints, which took several weeks to resolve.


This bug affects critical cart functionality in international stores and risks creating a broken experience for end users.

— Related: Use documented endpoints for cart by bakura10 · Pull Request #3787 · Shopify/dawn · GitHub

Thanks.

Hey there!

Fix is on the way :blush:

1 Like