# Cart - storefront - OBJECT
Version: 2025-01

## Description
A cart represents the merchandise that a buyer intends to purchase,
and the estimated cost associated with the cart. Learn how to
[interact with a cart](https://shopify.dev/custom-storefronts/internationalization/international-pricing)
during a customer's session.


### Access Scopes



## Fields
* [appliedGiftCards](/docs/api/storefront/2025-01/objects/AppliedGiftCard): AppliedGiftCard! - The gift cards that have been applied to the cart.
* [attribute](/docs/api/storefront/2025-01/objects/Attribute): Attribute - An attribute associated with the cart.
* [attributes](/docs/api/storefront/2025-01/objects/Attribute): Attribute! - The attributes associated with the cart. Attributes are represented as key-value pairs.
* [buyerIdentity](/docs/api/storefront/2025-01/objects/CartBuyerIdentity): CartBuyerIdentity! - Information about the buyer that's interacting with the cart.
* [checkoutUrl](/docs/api/storefront/2025-01/scalars/URL): URL! - The URL of the checkout for the cart.
* [cost](/docs/api/storefront/2025-01/objects/CartCost): CartCost! - The estimated costs that the buyer will pay at checkout. The costs are subject to change and changes will be reflected at checkout. The `cost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing).
* [createdAt](/docs/api/storefront/2025-01/scalars/DateTime): DateTime! - The date and time when the cart was created.
* [delivery](/docs/api/storefront/2025-01/objects/CartDelivery): CartDelivery! - The delivery properties of the cart.
* [discountAllocations](/docs/api/storefront/2025-01/interfaces/CartDiscountAllocation): CartDiscountAllocation! - The discounts that have been applied to the entire cart.
* [discountCodes](/docs/api/storefront/2025-01/objects/CartDiscountCode): CartDiscountCode! - The case-insensitive discount codes that the customer added at checkout.
* [estimatedCost](/docs/api/storefront/2025-01/objects/CartEstimatedCost): CartEstimatedCost! - The estimated costs that the buyer will pay at checkout. The estimated costs are subject to change and changes will be reflected at checkout. The `estimatedCost` field uses the `buyerIdentity` field to determine [international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing).
* [id](/docs/api/storefront/2025-01/scalars/ID): ID! - A globally-unique ID.
* [metafield](/docs/api/storefront/2025-01/objects/Metafield): Metafield - A [custom field](https://shopify.dev/docs/apps/build/custom-data), including its `namespace` and `key`, that's associated with a Shopify resource for the purposes of adding and storing additional information.
* [metafields](/docs/api/storefront/2025-01/objects/Metafield): Metafield! - A list of [custom fields](/docs/apps/build/custom-data) that a merchant associates with a Shopify resource.
* [note](/docs/api/storefront/2025-01/scalars/String): String - A note that's associated with the cart. For example, the note can be a personalized message to the buyer.
* [totalQuantity](/docs/api/storefront/2025-01/scalars/Int): Int! - The total number of items in the cart.
* [updatedAt](/docs/api/storefront/2025-01/scalars/DateTime): DateTime! - The date and time when the cart was updated.

## Connections
* [deliveryGroups](/docs/api/storefront/2025-01/connections/CartDeliveryGroupConnection): CartDeliveryGroupConnection!
* [lines](/docs/api/storefront/2025-01/connections/BaseCartLineConnection): BaseCartLineConnection!



## Related queries
* [cart](/docs/api/storefront/2025-01/queries/cart) Retrieve a cart by its ID. For more information, refer to
[Manage a cart with the Storefront API](https://shopify.dev/custom-storefronts/cart/manage).


## Related mutations
* [cartAttributesUpdate](/docs/api/storefront/2025-01/mutations/cartAttributesUpdate) Updates the attributes on a cart.
* [cartBuyerIdentityUpdate](/docs/api/storefront/2025-01/mutations/cartBuyerIdentityUpdate) Updates customer information associated with a cart.
Buyer identity is used to determine
[international pricing](https://shopify.dev/custom-storefronts/internationalization/international-pricing)
and should match the customer's shipping address.

* [cartCreate](/docs/api/storefront/2025-01/mutations/cartCreate) Creates a new cart.
* [cartDeliveryAddressesAdd](/docs/api/storefront/2025-01/mutations/cartDeliveryAddressesAdd) Adds delivery addresses to the cart.
* [cartDeliveryAddressesRemove](/docs/api/storefront/2025-01/mutations/cartDeliveryAddressesRemove) Removes delivery addresses from the cart.
* [cartDeliveryAddressesUpdate](/docs/api/storefront/2025-01/mutations/cartDeliveryAddressesUpdate) Updates one or more delivery addresses on a cart.
* [cartDiscountCodesUpdate](/docs/api/storefront/2025-01/mutations/cartDiscountCodesUpdate) Updates the discount codes applied to the cart.
* [cartGiftCardCodesRemove](/docs/api/storefront/2025-01/mutations/cartGiftCardCodesRemove) Removes the gift card codes applied to the cart.
* [cartGiftCardCodesUpdate](/docs/api/storefront/2025-01/mutations/cartGiftCardCodesUpdate) Updates the gift card codes applied to the cart.
* [cartLinesAdd](/docs/api/storefront/2025-01/mutations/cartLinesAdd) Adds a merchandise line to the cart.
* [cartLinesRemove](/docs/api/storefront/2025-01/mutations/cartLinesRemove) Removes one or more merchandise lines from the cart.
* [cartLinesUpdate](/docs/api/storefront/2025-01/mutations/cartLinesUpdate) Updates one or more merchandise lines on a cart.
* [cartNoteUpdate](/docs/api/storefront/2025-01/mutations/cartNoteUpdate) Updates the note on the cart.
* [cartSelectedDeliveryOptionsUpdate](/docs/api/storefront/2025-01/mutations/cartSelectedDeliveryOptionsUpdate) Update the selected delivery options for a delivery group.

## Related Unions
* [MetafieldParentResource](/docs/api/storefront/2025-01/unions/MetafieldParentResource) A resource that the metafield belongs to.

## Examples