---
title: CartCodeDiscountAllocation - Storefront API
description: >-
  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).
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/storefront/latest/objects/CartCodeDiscountAllocation
  md: >-
    https://shopify.dev/docs/api/storefront/latest/objects/CartCodeDiscountAllocation.md
api_name: storefront
api_type: graphql
type: object
---

# Cart​Code​Discount​Allocation

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).

## Fields

* code

  [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String)

  non-null

  The code used to apply the discount.

* 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.

* source​Discount​Application

  [Base​Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/latest/interfaces/BaseCartDiscountApplication)

  non-null

  The discount application that created this allocation, with corrected value semantics.

* 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.

* discount​Application

  [Cart​Discount​Application!](https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountApplication)

  non-nullDeprecated

***

## Map

No referencing types

***

## Interfaces

* [Cart​Discount​Allocation](https://shopify.dev/docs/api/storefront/latest/interfaces/CartDiscountAllocation)

  interface

***

## CartCodeDiscountAllocation Implements

### Implements

* [Cart​Discount​Allocation](https://shopify.dev/docs/api/storefront/latest/interfaces/CartDiscountAllocation)
