Updating entitledLines for Discounts in Subscription Contracts

Hi everyone,

We’re encountering an issue when updating subscription contracts and applying discounts through our custom subscription management app.

Our app allows customers to add/remove discounts and modify subscription contents (i.e., change products within the contract). However, we’ve noticed that if a customer has already fully used a discount (e.g., a discount that applies to the first 3 recurring payments), Shopify throws a NO_ENTITLED_LINES error when calling subscriptionDraftDiscountCodeApply after they modify their subscription contents.

This is unexpected because the discount’s usageCount is equal to recurringCycleLimit, meaning it should be fully consumed. Yet, Shopify still enforces entitledLines, preventing the discount from being applied to the updated contract.

Questions:

  1. Is this a known limitation?

  2. Is there any way to manually update the entitledLines field for an applied discount?

  3. The behavior described in the official Shopify docs suggests that discounts should be reapplied to remaining applicable items when contract line items are updated. Are we misinterpreting this?

For reference, we’re using the 2024-10 GraphQL API version.

Any insights would be greatly appreciated. Thanks!

Hi, I’ve flagged this to the relevant team internally - I’ll let you know what their recommendation is.