--- title: DiscountApplication - Storefront API description: > Captures the intent of a discount at the time it was applied. Each implementation represents a different discount source, such as [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), and manual discounts. The actual discounted amount on a line item or shipping line is represented by the [`DiscountAllocation`](/docs/api/storefront/unstable/objects/DiscountAllocation) object, which references the discount application it originated from. api_version: unstable api_name: storefront source_url: html: >- https://shopify.dev/docs/api/storefront/unstable/interfaces/DiscountApplication md: >- https://shopify.dev/docs/api/storefront/unstable/interfaces/DiscountApplication.md --- # Discount​Application interface Captures the intent of a discount at the time it was applied. Each implementation represents a different discount source, such as [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts), [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes), and manual discounts. The actual discounted amount on a line item or shipping line is represented by the [`DiscountAllocation`](https://shopify.dev/docs/api/storefront/unstable/objects/DiscountAllocation) object, which references the discount application it originated from. ## Fields * allocation​Method [Discount​Application​Allocation​Method!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationAllocationMethod) non-null The method by which the discount's value is allocated to its entitled items. * target​Selection [Discount​Application​Target​Selection!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetSelection) non-null Which lines of targetType that the discount is allocated over. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * value [Pricing​Value!](https://shopify.dev/docs/api/storefront/unstable/unions/PricingValue) non-null The value of the discount application. *** ## Types implemented in * [Automatic​Discount​Application](https://shopify.dev/docs/api/storefront/unstable/objects/AutomaticDiscountApplication) OBJECT An [automatic discount](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) applied to a cart or checkout without requiring a discount code. Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/unstable/interfaces/DiscountApplication) interface. Includes the discount's title, value, and allocation details that specify how the discount amount distributes across entitled line items or shipping lines. * allocation​Method [Discount​Application​Allocation​Method!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationAllocationMethod) non-null The method by which the discount's value is allocated to its entitled items. * target​Selection [Discount​Application​Target​Selection!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetSelection) non-null Which lines of targetType that the discount is allocated over. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * title [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) non-null The title of the application. * value [Pricing​Value!](https://shopify.dev/docs/api/storefront/unstable/unions/PricingValue) non-null The value of the discount application. * [Discount​Code​Application](https://shopify.dev/docs/api/storefront/unstable/objects/DiscountCodeApplication) OBJECT Records the configuration and intent of a [discount code](https://help.shopify.com/manual/discounts/discount-methods/discount-codes) when a customer applies it. This includes the code string, allocation method, target type, and discount value at the time of application. The [`applicable`](https://shopify.dev/docs/api/storefront/latest/objects/DiscountCodeApplication#field-DiscountCodeApplication.fields.applicable) field indicates whether the code was successfully applied. *** **Note:** To see the actual amounts discounted on specific line items or shipping lines, use the \\\Discount\Allocation\\\ object instead. *** * allocation​Method [Discount​Application​Allocation​Method!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationAllocationMethod) non-null The method by which the discount's value is allocated to its entitled items. * applicable [Boolean!](https://shopify.dev/docs/api/storefront/unstable/scalars/Boolean) non-null Specifies whether the discount code was applied successfully. * code [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) non-null The string identifying the discount code that was used at the time of application. * target​Selection [Discount​Application​Target​Selection!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetSelection) non-null Which lines of targetType that the discount is allocated over. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * value [Pricing​Value!](https://shopify.dev/docs/api/storefront/unstable/unions/PricingValue) non-null The value of the discount application. * [Manual​Discount​Application](https://shopify.dev/docs/api/storefront/unstable/objects/ManualDiscountApplication) OBJECT A discount created manually by a merchant, as opposed to [automatic discounts](https://help.shopify.com/manual/discounts/discount-methods/automatic-discounts) or [discount codes](https://help.shopify.com/manual/discounts/discount-methods/discount-codes). Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/unstable/interfaces/DiscountApplication) interface and includes a title, optional description, and the discount value as either a fixed amount or percentage. * allocation​Method [Discount​Application​Allocation​Method!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationAllocationMethod) non-null The method by which the discount's value is allocated to its entitled items. * description [String](https://shopify.dev/docs/api/storefront/unstable/scalars/String) The description of the application. * target​Selection [Discount​Application​Target​Selection!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetSelection) non-null Which lines of targetType that the discount is allocated over. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * title [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) non-null The title of the application. * value [Pricing​Value!](https://shopify.dev/docs/api/storefront/unstable/unions/PricingValue) non-null The value of the discount application. * [Script​Discount​Application](https://shopify.dev/docs/api/storefront/unstable/objects/ScriptDiscountApplication) OBJECT A discount application created by a Shopify Script. Implements the [`DiscountApplication`](https://shopify.dev/docs/api/storefront/unstable/interfaces/DiscountApplication) interface and captures the discount's value, allocation method, and targeting rules at the time the script applied it. * allocation​Method [Discount​Application​Allocation​Method!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationAllocationMethod) non-null The method by which the discount's value is allocated to its entitled items. * target​Selection [Discount​Application​Target​Selection!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetSelection) non-null Which lines of targetType that the discount is allocated over. * target​Type [Discount​Application​Target​Type!](https://shopify.dev/docs/api/storefront/unstable/enums/DiscountApplicationTargetType) non-null The type of line that the discount is applicable towards. * title [String!](https://shopify.dev/docs/api/storefront/unstable/scalars/String) non-null The title of the application as defined by the Script. * value [Pricing​Value!](https://shopify.dev/docs/api/storefront/unstable/unions/PricingValue) non-null The value of the discount application. *** ##### Variables ```json { "allocationMethod": "", "targetSelection": "", "targetType": "", "value": "" } ``` ##### Schema ```graphql interface DiscountApplication { allocationMethod: DiscountApplicationAllocationMethod! targetSelection: DiscountApplicationTargetSelection! targetType: DiscountApplicationTargetType! value: PricingValue! } ```