--- title: CartMetafieldsSetInput - Storefront API description: The input fields for a cart metafield value to set. api_version: 2025-07 api_name: storefront type: input-object api_type: graphql source_url: html: >- https://shopify.dev/docs/api/storefront/2025-07/input-objects/CartMetafieldsSetInput md: >- https://shopify.dev/docs/api/storefront/2025-07/input-objects/CartMetafieldsSetInput.md --- # Cart​Metafields​Set​Input input\_object The input fields for a cart metafield value to set. ## Fields * key [String!](https://shopify.dev/docs/api/storefront/2025-07/scalars/String) non-null The key name of the cart metafield. * owner​Id [ID!](https://shopify.dev/docs/api/storefront/2025-07/scalars/ID) non-null The ID of the cart resource. * type [String!](https://shopify.dev/docs/api/storefront/2025-07/scalars/String) non-null The type of data that the cart metafield stores. The type of data must be a [supported type](https://shopify.dev/apps/metafields/types). * value [String!](https://shopify.dev/docs/api/storefront/2025-07/scalars/String) non-null The data to store in the cart metafield. The data is always stored as a string, regardless of the metafield's type. *** ## Map No referencing types