Skip to main content
Anchor to CartDiscountAllocation

CartDiscountAllocation

interface

A common interface for querying discount allocations regardless of how the discount was applied (automatic, code, or custom). Each implementation represents a different discount source.

Tracks how a discount distributes across cart lines. Each allocation includes the CartDiscountApplication details, the discounted amount, and whether the discount targets line items or shipping.

•MoneyV2!
non-null

The discounted amount that has been applied to the cart line.

•DiscountApplicationTargetType!
non-null

The type of line that the discount is applicable towards.

•CartDiscountApplication!
non-nullDeprecated

Was this section helpful?

Anchor to Types implemented inTypes implemented in

•OBJECT

A discount allocation that applies automatically to a cart line when configured conditions are met. Unlike CartCodeDiscountAllocation, automatic discounts don't require customers to enter a code.

•MoneyV2!
non-null

The discounted amount that has been applied to the cart line.

•DiscountApplicationTargetType!
non-null

The type of line that the discount is applicable towards.

•String!
non-null

The title of the allocated discount.

•CartDiscountApplication!
non-nullDeprecated
•OBJECT

A discount allocation applied to a cart line when a customer enters a discount code.

•String!
non-null

The code used to apply the discount.

•MoneyV2!
non-null

The discounted amount that has been applied to the cart line.

•DiscountApplicationTargetType!
non-null

The type of line that the discount is applicable towards.

•CartDiscountApplication!
non-nullDeprecated
•OBJECT

The discounts automatically applied to the cart line based on prerequisites that have been met.

•MoneyV2!
non-null

The discounted amount that has been applied to the cart line.

•DiscountApplicationTargetType!
non-null

The type of line that the discount is applicable towards.

•String!
non-null

The title of the allocated discount.

•CartDiscountApplication!
non-nullDeprecated

Was this section helpful?