Skip to main content

The Storefront API's Cart object now exposes warnings for non-applicable discount codes

As of version 2025-07 of the GraphQL Storefront API, the Cart object now provides detailed warnings for non-applicable CartDiscountCodes.

Previously, when a discount code could not be applied, the CartDiscountCode was returned with applicable: false, and no additional details. This lack of information made it difficult for developers to provide helpful feedback to buyers.

With the introduction of the new CartWarning types, you can now clearly identify the specific reasons why a discount code isn't applicable.

Was this section helpful?