BYOB SDK
State
bundleId
bundleIdsteps
stepsinterface ResolvedStep {
id: string;
title: string;
minQuantity: number;
maxQuantity: number | null;
enableSelectionLimit: boolean;
products: ShopifyProduct[];
}
interface ShopifyProduct {
id: string;
title: string;
handle: string;
featuredImage: { url: string; altText: string | null } | null;
variants: ProductVariant[];
}
interface ProductVariant {
id: string; // GID, e.g. "gid://shopify/ProductVariant/123"
title: string; // e.g. "Red / Small"
price: string; // numeric string, e.g. "29.99"
available: boolean;
image: { url: string; altText: string | null } | null;
selectedOptions: { name: string; value: string }[];
}isLoading
isLoadingerror
errorcart
cartcartTotal
cartTotalcartTotalFormatted
cartTotalFormattedcartCount
cartCountcanCheckout
canCheckoutisTierMaxReached
isTierMaxReachedisCheckingOut
isCheckingOutcheckoutError
checkoutErrordiscountConfig
discountConfigActions
formatPrice(amount)
formatPrice(amount)addToCart(product, variantId, stepId?)
addToCart(product, variantId, stepId?)removeFromCart(variantId, stepId?)
removeFromCart(variantId, stepId?)updateQuantity(variantId, delta, stepId?)
updateQuantity(variantId, delta, stepId?)getItemQuantity(variantId, stepId?)
getItemQuantity(variantId, stepId?)isStepFull(stepId)
isStepFull(stepId)canAddToStep(stepId)
canAddToStep(stepId)checkout(redirectTarget?)
checkout(redirectTarget?)Full example
Last updated
Was this helpful?
