Why the JSON data in product-handle-js differs depending on the store

Topic summary

A developer discovered inconsistent JSON data structures when retrieving selling plan information via Shopify’s Ajax API (/products/product-handle.js).

The Issue:
When a product with three variants has different selling plan groups assigned to different variants, the API sometimes consolidates multiple plan groups into a single group in the JSON response, despite them being separate in the Shopify Admin.

Root Cause Identified:
The merging occurs when multiple selling plan groups share the same name. The JSON API uses group names (not IDs) for consolidation, following Storefront API conventions rather than Admin API behavior.

Resolution:
Changing the plan group names to be unique resolves the issue and returns the expected separate group structures in the JSON response.

Key Takeaway:
This appears to be intended behavior rather than a bug—selling plan groups with identical names are merged in the Storefront/Ajax API responses, even if they have different IDs in the Admin GraphQL API. The group IDs in the JSON response differ from Admin GraphQL IDs, indicating different API specification standards.

Summarized with AI on November 15. AI used: claude-sonnet-4-5-20250929.

Hey @ptt-kmatsubara

Products can have multiple selling plan groups (e.g. ‘Subscribe and save’, ‘Prepaid’) and each selling plan group can have multiple selling plans (.e.g ‘Delivery Weekly’, ‘Delivery Monthly’).

More info here: https://shopify.dev/docs/apps/selling-strategies/subscriptions/selling-plans