--- title: CartDiscountCode - Storefront API description: | A discount code applied to a [`Cart`](/docs/api/storefront/2025-07/objects/Cart). Discount codes are case-insensitive and can be added using the [`cartDiscountCodesUpdate`](/docs/api/storefront/2025-07/mutations/cartDiscountCodesUpdate) mutation. The [`applicable`](/docs/api/storefront/2025-07/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: 2025-07 api_name: storefront type: object api_type: graphql source_url: html: https://shopify.dev/docs/api/storefront/2025-07/objects/CartDiscountCode md: https://shopify.dev/docs/api/storefront/2025-07/objects/CartDiscountCode.md --- # Cart​Discount​Code object A discount code applied to a [`Cart`](https://shopify.dev/docs/api/storefront/2025-07/objects/Cart). Discount codes are case-insensitive and can be added using the [`cartDiscountCodesUpdate`](https://shopify.dev/docs/api/storefront/2025-07/mutations/cartDiscountCodesUpdate) mutation. The [`applicable`](https://shopify.dev/docs/api/storefront/2025-07/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/2025-07/scalars/Boolean) non-null Whether the discount code is applicable to the cart's current contents. * code [String!](https://shopify.dev/docs/api/storefront/2025-07/scalars/String) non-null The code for the discount. *** ## Map ### Fields with this object * [Cart.discountCodes](https://shopify.dev/docs/api/storefront/2025-07/objects/Cart#field-Cart.fields.discountCodes)