---
title: CartDiscountCodesUpdatePayload - Storefront API
description: Return type for `cartDiscountCodesUpdate` mutation.
api_version: 2026-10
source_url:
  html: >-
    https://shopify.dev/docs/api/storefront/latest/payloads/CartDiscountCodesUpdatePayload
  md: >-
    https://shopify.dev/docs/api/storefront/latest/payloads/CartDiscountCodesUpdatePayload.md
api_name: storefront
api_type: graphql
type: payload
---

# Cart​Discount​Codes​Update​Payload

payload

Return type for `cartDiscountCodesUpdate` mutation.

## Fields

* cart

  [Cart](https://shopify.dev/docs/api/storefront/latest/objects/Cart)

  The updated cart.

* user​Errors

  [\[Cart​User​Error!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CartUserError)

  non-null

  The list of errors that occurred from executing the mutation.

* warnings

  [\[Cart​Warning!\]!](https://shopify.dev/docs/api/storefront/latest/objects/CartWarning)

  non-null

  A list of warnings that occurred during the mutation.

***

## Mutations with this payload

* [cart​Discount​Codes​Update](https://shopify.dev/docs/api/storefront/latest/mutations/cartDiscountCodesUpdate)

  mutation

  Updates the discount codes applied to a [`Cart`](https://shopify.dev/docs/api/storefront/2026-10/objects/Cart). This mutation replaces all existing discount codes with the provided list, so pass an empty array to remove all codes. Discount codes are case-insensitive.

  After updating, check each [`CartDiscountCode`](https://shopify.dev/docs/api/storefront/2026-10/objects/CartDiscountCode) in the cart's [`discountCodes`](https://shopify.dev/docs/api/storefront/2026-10/objects/Cart#field-Cart.fields.discountCodes) field to see whether the code is applicable to the cart's current contents.

  * cart​Id

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

    required

    ### Arguments

    The ID of the cart.

  * discount​Codes

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

    required

    The case-insensitive discount codes that the customer added at checkout.

    The input must not contain more than `250` values.

  ***

***

## Map

### Mutations with this payload

* [cart​Discount​Codes​Update](https://shopify.dev/docs/api/storefront/latest/mutations/cartDiscountCodesUpdate)
