--- title: cartMetafieldsSet - Storefront API description: > Sets cart metafield values. Cart metafield values will be set regardless if they were previously created or not. Allows a maximum of 25 cart metafields to be set at a time. api_version: 2026-01 api_name: storefront type: mutation api_type: graphql source_url: html: 'https://shopify.dev/docs/api/storefront/latest/mutations/cartMetafieldsSet' md: >- https://shopify.dev/docs/api/storefront/latest/mutations/cartMetafieldsSet.md --- # cart​Metafields​Set mutation Sets cart metafield values. Cart metafield values will be set regardless if they were previously created or not. Allows a maximum of 25 cart metafields to be set at a time. ## Arguments * metafields *** ## Cart​Metafields​Set​Payload returns * metafields * userErrors *** ## Examples * ### cartMetafieldsSet reference