--- title: CartInput - Storefront API description: The input fields to create a cart. api_version: 2025-10 api_name: storefront type: input-object api_type: graphql source_url: html: https://shopify.dev/docs/api/storefront/latest/input-objects/CartInput md: https://shopify.dev/docs/api/storefront/latest/input-objects/CartInput.md --- # Cart​Input input\_object The input fields to create a cart. ## Fields * attributes [\[Attribute​Input!\]](https://shopify.dev/docs/api/storefront/latest/input-objects/AttributeInput) An array of key-value pairs that contains additional information about the cart. The input must not contain more than `250` values. * buyer​Identity [Cart​Buyer​Identity​Input](https://shopify.dev/docs/api/storefront/latest/input-objects/CartBuyerIdentityInput) The customer associated with the cart. Used to determine \[international pricing] (). Buyer identity should match the customer's shipping address. * delivery [Cart​Delivery​Input](https://shopify.dev/docs/api/storefront/latest/input-objects/CartDeliveryInput) The delivery-related fields for the cart. * discount​Codes [\[String!\]](https://shopify.dev/docs/api/storefront/latest/scalars/String) The case-insensitive discount codes that the customer added at checkout. The input must not contain more than `250` values. * gift​Card​Codes [\[String!\]](https://shopify.dev/docs/api/storefront/latest/scalars/String) The case-insensitive gift card codes. The input must not contain more than `250` values. * lines [\[Cart​Line​Input!\]](https://shopify.dev/docs/api/storefront/latest/input-objects/CartLineInput) A list of merchandise lines to add to the cart. The input must not contain more than `250` values. * metafields [\[Cart​Input​Metafield​Input!\]](https://shopify.dev/docs/api/storefront/latest/input-objects/CartInputMetafieldInput) The metafields to associate with this cart. The input must not contain more than `250` values. * note [String](https://shopify.dev/docs/api/storefront/latest/scalars/String) A note that's associated with the cart. For example, the note can be a personalized message to the buyer. *** ## Map No referencing types