--- title: CartDiscountCode - Storefront API description: > A discount code applied to a [`Cart`](/docs/api/storefront/2026-01/objects/Cart). Discount codes are case-insensitive and can be added using the [`cartDiscountCodesUpdate`](/docs/api/storefront/2026-01/mutations/cartDiscountCodesUpdate) mutation. The [`applicable`](/docs/api/storefront/2026-01/objects/CartDiscountCode#field-CartDiscountCode.fields.applicable) field indicates whether the code applies to the cart's current contents, which might change as items are added or removed. api_version: 2026-01 api_name: storefront type: object api_type: graphql source_url: html: 'https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountCode' md: 'https://shopify.dev/docs/api/storefront/latest/objects/CartDiscountCode.md' --- # Cart​Discount​Code object A discount code applied to a [`Cart`](https://shopify.dev/docs/api/storefront/2026-01/objects/Cart). Discount codes are case-insensitive and can be added using the [`cartDiscountCodesUpdate`](https://shopify.dev/docs/api/storefront/2026-01/mutations/cartDiscountCodesUpdate) mutation. The [`applicable`](https://shopify.dev/docs/api/storefront/2026-01/objects/CartDiscountCode#field-CartDiscountCode.fields.applicable) field indicates whether the code applies to the cart's current contents, which might change as items are added or removed. ## Fields * applicable [Boolean!](https://shopify.dev/docs/api/storefront/latest/scalars/Boolean) non-null Whether the discount code is applicable to the cart's current contents. * code [String!](https://shopify.dev/docs/api/storefront/latest/scalars/String) non-null The code for the discount. *** ## Map ### Fields with this object * [Cart.discountCodes](https://shopify.dev/docs/api/storefront/latest/objects/Cart#field-Cart.fields.discountCodes)