--- title: CartInputMetafieldInput - Storefront API description: The input fields for a cart metafield value to set. api_version: 2025-01 api_name: storefront type: input-object api_type: graphql source_url: html: >- https://shopify.dev/docs/api/storefront/2025-01/input-objects/CartInputMetafieldInput md: >- https://shopify.dev/docs/api/storefront/2025-01/input-objects/CartInputMetafieldInput.md --- # Cart​Input​Metafield​Input input\_object The input fields for a cart metafield value to set. ## Fields * key [String!](https://shopify.dev/docs/api/storefront/2025-01/scalars/String) non-null The key name of the metafield. * type [String!](https://shopify.dev/docs/api/storefront/2025-01/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-01/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. *** ## Input objects using this input * [Cart​Input.metafields](https://shopify.dev/docs/api/storefront/2025-01/input-objects/CartInput#fields-metafields) INPUT OBJECT The input fields to create a cart. *** ## Map ### Input objects using this input * [Cart​Input.metafields](https://shopify.dev/docs/api/storefront/2025-01/input-objects/CartInput#fields-metafields)