--- title: CartInputMetafieldInput - Storefront API description: The input fields for a cart metafield value to set. api_version: unstable api_name: storefront source_url: html: https://shopify.dev/docs/api/storefront/unstable/input-objects/cartinputmetafieldinput md: https://shopify.dev/docs/api/storefront/unstable/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/unstable/scalars/String) non-null The key name of the metafield. * type [String!](https://shopify.dev/docs/api/storefront/unstable/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/unstable/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/unstable/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/unstable/input-objects/CartInput#fields-metafields)