Skip to main content
union

A ProductVariant that a buyer intends to purchase at checkout.

•OBJECT

A specific version of a product available for sale, differentiated by options like size or color. For example, a small blue t-shirt and a large blue t-shirt are separate variants of the same product. For more information, see the docs on Shopify's product model.

For products with quantity rules, variants enforce minimum, maximum, and increment constraints on purchases.

Variants also support subscriptions and pre-orders through selling plan allocations objects, bundle configurations through product variant components objects, and shop pay installments pricing for flexible payment options.


Was this section helpful?

Anchor to Fields with this unionFields with this union

•INTERFACE

Defines the shared fields for items in a shopping cart. Implemented by CartLine for individual merchandise and ComponentizableCartLine for grouped merchandise like bundles.

Each implementation includes the merchandise being purchased, quantity, cost breakdown, applied discounts, custom attributes, and any associated SellingPlan.

•OBJECT

An item in a customer's Cart representing a product variant they intend to purchase. Each cart line tracks the merchandise, quantity, cost breakdown, and any applied discounts.

Cart lines can include custom attributes for additional information like gift wrapping requests, and can be associated with a SellingPlanAllocation for purchase options like subscriptions, pre-orders, or try-before-you-buy. The instructions field indicates whether the line can be removed or have its quantity updated.

•OBJECT

Represents information about the grouped merchandise in the cart.


Was this section helpful?