--- title: CartDiscountAllocation - Storefront API description: > A common interface for querying discount allocations regardless of how the discount was applied ([automatic](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), or custom). Each implementation represents a different discount source. Tracks how a discount distributes across [cart lines](/docs/api/storefront/2026-01/objects/CartLine). Each allocation includes the [`CartDiscountApplication`](/docs/api/storefront/2026-01/objects/CartDiscountApplication) details, the discounted amount, and whether the discount targets line items or shipping. api_version: 2026-01 api_name: storefront type: interface api_type: graphql source_url: html: >- https://shopify.dev/docs/api/storefront/latest/interfaces/CartDiscountAllocation md: >- https://shopify.dev/docs/api/storefront/latest/interfaces/CartDiscountAllocation.md --- # Cart​Discount​Allocation interface A common interface for querying discount allocations regardless of how the discount was applied ([automatic](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), or custom). Each implementation represents a different discount source. Tracks how a discount distributes across [cart lines](https://shopify.dev/docs/api/storefront/2026-01/objects/CartLine). Each allocation includes the [`CartDiscountApplication`](https://shopify.dev/docs/api/storefront/2026-01/objects/CartDiscountApplication) details, the discounted amount, and whether the discount targets line items or shipping. ## Fields * discount​Application [Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountApplication) non-null The discount that have been applied on the cart line. * discounted​Amount [Money​V2!](https://shopify.dev/docs/api/storefront/latest/objects/MoneyV2) non-null The discounted amount that has been applied to the cart line. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/latest/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. *** ## Types implemented in * [Cart​Automatic​Discount​Allocation](https://shopify.dev/docs/api/storefront/latest/objects/CartAutomaticDiscountAllocation) OBJECT A discount allocation [that applies automatically](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) to a cart line when configured conditions are met. Unlike [`CartCodeDiscountAllocation`](https://shopify.dev/docs/api/storefront/2026-01/objects/CartCodeDiscountAllocation), automatic discounts don't require customers to enter a code. * discount​Application [Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountApplication) non-null The discount that have been applied on the cart line. * discounted​Amount [Money​V2!](https://shopify.dev/docs/api/storefront/latest/objects/MoneyV2) non-null The discounted amount that has been applied to the cart line. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/latest/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * title [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null The title of the allocated discount. * [Cart​Code​Discount​Allocation](https://shopify.dev/docs/api/storefront/latest/objects/CartCodeDiscountAllocation) OBJECT A discount allocation applied to a cart line when a customer enters a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). * code [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null The code used to apply the discount. * discount​Application [Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountApplication) non-null The discount that have been applied on the cart line. * discounted​Amount [Money​V2!](https://shopify.dev/docs/api/storefront/latest/objects/MoneyV2) non-null The discounted amount that has been applied to the cart line. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/latest/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * [Cart​Custom​Discount​Allocation](https://shopify.dev/docs/api/storefront/latest/objects/CartCustomDiscountAllocation) OBJECT The discounts automatically applied to the cart line based on prerequisites that have been met. * discount​Application [Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountApplication) non-null The discount that have been applied on the cart line. * discounted​Amount [Money​V2!](https://shopify.dev/docs/api/storefront/latest/objects/MoneyV2) non-null The discounted amount that has been applied to the cart line. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/latest/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * title [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null The title of the allocated discount. *** ##### Variables ```json { "discountApplication": "", "discountedAmount": "", "targetType": "" } ``` ##### Schema ```graphql interface CartDiscountAllocation { discountApplication: CartDiscountApplication! discountedAmount: MoneyV2! targetType: DiscountApplicationTargetType! } ```