Skip to main content

New discount fields in the Storefront API's cart types

As of API version 2026-07, several changes have been introduced to the discount fields and amounts in the Storefront API.

What's changed

Deprecated Fields:

  • The cart.discountAllocations field is deprecated. Use cart.lines[].discountAllocations(lineLevelOnly: false) and cart.deliveryGroups[].discountAllocations instead.
  • The cartDiscountAllocation.discountApplication field is deprecated. Use sourceDiscountApplication instead. Note: the value field on discountApplication incorrectly returns the per-line allocated amount rather than the configured discount amount (for example, a $10 fixed discount allocated as $4 to one line shows value: $4). The new sourceDiscountApplication field returns the correct value.

New Fields:

  • cart.discountApplications: Lists all discounts (for example, product, shipping, and order) currently applied to the cart.
  • cartDiscountAllocation.sourceDiscountApplication: Returns the discount application with the correct configured discount value and concrete type information. For example, a $10 fixed discount will show value: $10 regardless of how it's allocated across lines. Access type-specific fields using GraphQL fragments, for example sourceDiscountApplication { … on CartCodeDiscountApplication { code } }.
  • baseCartDiscountApplication.totalAllocatedAmount: Shows the total discount amount allocated across the entire cart. For instance, if a 10% discount splits as $4 on line A and $6 on line B, both lines will show totalAllocatedAmount: $10.
  • cart.deliveryGroups[].discountAllocations: Displays the discounts allocated to the delivery group.

New Argument:

What you need to do

  • Update queries to use cart.discountApplications instead of cart.discountAllocations for reading all discount applications on a cart.
  • Replace cartDiscountAllocation.discountApplication with sourceDiscountApplication for accurate discount values and type-specific fields.
  • Move product allocation queries to cart.lines[].discountAllocations(lineLevelOnly: false).
  • Move shipping allocation queries to cart.deliveryGroups[].discountAllocations.
  • Test your discount calculations with percentage, fixed amount, and free shipping discounts.
Was this section helpful?