Types
Cart Types
TypeScript interfaces for cart and checkout
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
TypeScript interfaces for cart and checkout
interface ShopifyCart {
id: string
checkoutUrl: string
totalQuantity: number
cost: {
totalAmount: ShopifyMoney
subtotalAmount: ShopifyMoney
totalTaxAmount: ShopifyMoney | null
}
lines: {
edges: Array<{
node: ShopifyCartLine
cursor: string
}>
pageInfo: ShopifyPageInfo
}
}
interface ShopifyCartLine {
id: string
quantity: number
merchandise: ShopifyCartLineMerchandise
cost: {
totalAmount: ShopifyMoney
amountPerQuantity: ShopifyMoney
}
sellingPlanAllocation: ShopifySellingPlanAllocation | null
}
interface ShopifyCartLineMerchandise {
id: string
title: string
product: {
title: string
handle: string
}
image: ShopifyImage | null
price: ShopifyMoney
selectedOptions: Array<{
name: string
value: string
}>
}
interface CartLineInput {
merchandiseId: string
quantity: number
sellingPlanId?: string
}
interface CartLineUpdateInput {
id: string
quantity: number
}
type CartSubscriber = (cart: ShopifyCart | null) => void
interface ShopifySellingPlanAllocation {
sellingPlan: ShopifySellingPlan
checkoutChargeAmount: ShopifyMoney
remainingBalanceChargeAmount: ShopifyMoney
}
interface ShopifySellingPlan {
id: string
name: string
description: string | null
}