SubblySubbly
Log inGet started
  • Get started
  • Developer resources
SubblyCart.js widget reference
Docs
Information
    GlobalsCookies and storageErrors
Methods
    Open the widgetClose the widgetToggle the widgetLoad the shopUpdate the cartConfigure an itemAdd an itemUpdate an itemRemove an itemApply a couponQueue a couponRemove the couponApply a gift cardRemove the gift cardSet the languageSet the currencyReset the cartChange the settingsConfigure a giftPrefill customer dataSign a customer inSign the customer outReload the cartChange the URL configDisable the widgetEnable the widgetInitialize manually
Properties
    CartShopStateSDK clientEvent emitter
Events
    Listen to eventsStop listeningCart readyCart updatedWidget openedWidget closedCart resetEmail collectedPurchase completedCustomer signed inCustomer signed upCustomer signed out
Settings
    Configuration keysSettings keysURL parameters
Theming
    CSS variablesBase tokens

Properties

Read the cart, the shop, the language and currency in use, the SDK client, and the event emitter.

subblyCart.cart

The current cart: every cart field, plus the cart methods of the SDK. It is one live object, not a snapshot — the SDK writes the new data into the same object after every call, so a reference you store keeps showing current data. Clone it when you need a snapshot.

Treat it as read-only and change the cart through the widget methods. The SDK methods on it skip the widget's own store, so the panel does not refresh and no event fires.

The cart is ready as soon as the widget is initialized.

Cart properties

cartCartModel

The cart.

Cart methods

load(cartId?: string, params?: object) => Promise<CartModel>

Re-reads the cart from the API. The type declares the argument as a cart item ID; the code takes a cart ID.

create(payload?: CartUpdatePayload, params?: object) => Promise<CartModel>

Creates a cart and stores its ID in the subbly_cart_id cookie.

update(payload: CartUpdatePayload, params?: object) => Promise<CartModel>

Applies cart-level changes.

addItem(payload: CartItemAddPayload, params?: object) => Promise<CartModel>

Adds a line to the cart.

updateItem(cartItemId: string, payload: object, params?: object) => Promise<CartModel>

Changes a line in the cart.

removeItem(cartItemId: string, params?: object) => Promise<CartModel>

Removes a line from the cart.

getGiftingDates() => Promise<object>

Lists the dates a gift subscription can start on.

getShippingMethods(params: object) => Promise<ShippingMethodDelivery[]>

Lists the delivery methods for the cart.

getLocalPickups() => Promise<ShippingMethodPickup[]>

Lists the pickup points for the cart.

attachCustomer(params?: object) => Promise<CartModel>

Attaches the signed-in customer to the cart.

Read the cart
const { items, total, currencyCode } = subblyCart.cart // Amounts live on the summary items, joined on itemId const amount = subblyCart.cart.summaryItems.find( (summaryItem) => summaryItem.itemId === items[0].id ).total

subblyCart.shop

Public information about the shop: branding, currencies, languages, settings, plan limits and shipping countries. The widget loads it once while it starts. Like the cart, it is one live object; loadShop() refreshes it in place.

Shop properties

shopSubblyShop

The shop.

List the currencies the shop sells in
const codes = subblyCart.shop.currencies.map( (currency) => currency.abbreviation )

subblyCart.state

The currency and the language the widget runs on. Reading it builds a fresh plain object every time, so what you get is a snapshot.

Properties

currencyCodestring

Currency of the cart, as an ISO 4217 code. It falls back to the shop's default currency while the cart has none.

languageCodestring

Two-letter code of the language the widget shows, such as en.

Read the state
const { currencyCode, languageCode } = subblyCart.state

subblyCart.sdk

The Subbly.js client the widget uses, for Storefront API calls of your own. Sharing one client keeps the widget and your code on the same cart, customer, language and currency.

Calls you make on the client do not go through the widget's store, so the panel does not refresh and no widget event fires. Use the widget methods to change the cart.

Properties

VERSIONstring

Version of the SDK.

configobject

The client configuration: apiKey, apiUrl and lang.

setCurrency(code: string) => void

Re-prices the products, bundles and surveys the client loads next. It does not change the cart; use subblyCart.setCurrency for that.

setLanguage(code: string) => void

Sets the language the API answers in.

Modules

addressesmodule

list, store, delete.

authmodule

isAuthenticated, checkAuthenticated, login, registered, register, otp, otpLogin, social, logout, getAccessToken.

bundlesmodule

list, load, loadItems, loadGroups, quote, setCurrency.

cartmodule

The same object as subblyCart.cart.

checkoutmodule

purchase.

countriesmodule

list.

customersmodule

update, me, referral. All three need a signed-in customer.

funnelsmodule

prePurchaseFetch, prePurchaseRefresh, prePurchaseAccept, prePurchaseReject, midPurchaseFetch, midPurchaseAccept, midPurchaseReject, postPurchaseFetch, postPurchaseAccept, postPurchaseReject.

leadmodule

subscribe.

metafieldmodule

list.

paymentIntentsmodule

getPaymentIntent, confirm.

pickupInfomodule

list, store, delete.

productsmodule

list, load, loadVariant, loadPlan, setCurrency.

shopmodule

load. The same object as subblyCart.shop.

stockmodule

subscribe.

subscriptionsmodule

list, load, update, updatePreferences, updateBundle, loadItem, updateItem, updateItemBundle, updateItemPreferences.

surveysmodule

load, setCurrency.

walletmodule

store, list, setup, setupIntent.

Call the Storefront API
const { data } = await subblyCart.sdk.products.list({ perPage: 100 })

subblyCart.events

The event emitter of the widget. events.type holds the event names, and every name equals its own value, so events.type.CART_OPEN is 'CART_OPEN'. The emitter comes from tiny-typed-emitter, which follows the Node EventEmitter API.

Properties

typeobject

The event names: CART_READY, CART_UPDATED, CART_OPEN, CART_CLOSE, CART_RESET, EMAIL_COLLECTED, PURCHASE_COMPLETED, SIGN_IN, SIGN_UP and SIGN_OUT.

on(type, handler) => this

Adds a handler. addListener is an alias.

once(type, handler) => this

Adds a handler that runs for one emission.

off(type, handler) => this

Removes a handler. removeListener is an alias.

removeAllListeners(type?) => this

Removes every handler, of one event or of all of them.

prependListener(type, handler) => this

Adds a handler at the front of the list. prependOnceListener does the same for one emission.

eventNames() => string[]

Lists the events that have handlers.

listenerCount(type) => number

Counts the handlers of an event.

listeners(type) => handler[]

Lists the handlers of an event. rawListeners keeps the once wrappers.

setMaxListeners(count) => this

Sets how many handlers one event takes before Node warns. getMaxListeners reads it back.

emit(type, ...args) => boolean

Internal. The widget emits its own events; do not call this.

Subscribe and unsubscribe
const { events } = subblyCart const onUpdate = (err, cart) => console.log(cart.items.length) events.on(events.type.CART_UPDATED, onUpdate) events.off(events.type.CART_UPDATED, onUpdate)
Last modified on September 15, 2026
idstring

ID of the cart, as a UUID.

shopIdnumber

ID of the shop the cart belongs to.

statusstring

initialized, abandoned, expired, completed or restored.

attachedboolean

true once a customer is attached to the cart.

currencyCodestring

Currency the cart is priced in, as an ISO 4217 code.

baseCurrencyCodestring

Default currency of the shop.

itemsCartItem[]

Lines in the cart. An item carries no money. The amounts are in summaryItems, joined on summaryItems[].itemId === items[].id.

summaryItemsCartSummaryItem[]

Priced lines. This is where the money lives.

subTotalnumber

Cart total before discount and tax, in the minor unit.

discountTotalnumber

Discount across the cart, in the minor unit.

discountsCartDiscount[]

Every discount on the cart.

taxTotalnumber

Tax across the cart, in the minor unit.

taxRatenumber

Deprecated. Rates differ per line; read summaryItems[].taxRate.

customsFeenumber

Customs fee charged today, in the minor unit.

futureCustomsFeenumber

Customs fee on later shipments, in the minor unit.

adjustmentnumber

Top-up that lifts the payment to the minimum the gateway accepts.

totalnumber

Grand total across today's payment and the future one. This is not the amount charged today.

balanceChangeobject

Change to the customer's store balance. Holds amount and currencyCode.

couponCodestring | null

Code of the applied coupon.

couponCoupon | null

The applied coupon. The widget always expands it.

giftCardCodestring | null

Code of the applied gift card.

giftCardGiftCard | null

The applied gift card. The widget always expands it.

giftInfoobject

Gift details of the cart. Always an object.

startsAtstring | null

Date the subscription starts, as YYYY-MM-DD.

referralIdnumber | null

ID of the referring customer.

onboardingTemplateIdnumber | null

ID of the onboarding template the cart follows.

customerIdnumber | null

ID of the attached customer.

customerobject | null

Guest details, before a customer is attached. null afterwards.

shippingAddressCustomerAddress | CustomerPickupInfo | null

Where the order ships, or the pickup point the customer chose.

shippingAddressIdnumber | null

ID of the shipping address or of the pickup record.

billingAddressCustomerAddress | null

Billing address. Same fields as a delivery address.

billingAddressIdnumber | null

ID of the billing address.

shippingMethodShippingMethod | null

The chosen shipping method.

shippingMethodIdnumber | null

ID of the shipping method.

shippingCarrierShippingCarrier | null

The carrier that delivers the order. Holds id, name and serviceCodes.

shippingCarrierIdnumber | null

ID of the carrier.

shippingCarrierServicestring | null

Service code of the carrier, such as an express service.

paymentMethodPaymentMethod | null

The saved payment method on the cart. Only present for a signed-in customer.

paymentMethodIdnumber | null

ID of the payment method.

metadataMetafield[] | null

Metafields stored on the cart.

createdAtstring

Creation date, as an ISO 8601 string.

updatedAtstring

Last change date, as an ISO 8601 string.

Javascript
shopIdnumber

ID of the shop.

namestring

Name of the shop.

slugstring

Slug of the shop.

urlstring

Storefront URL.

statusboolean

true when the shop is open for business.

livemodeboolean

true on a live shop, false on a test shop.

checkoutUrlstring

URL of the Subbly-hosted checkout.

checkoutJsstring | null

HTML the merchant added under Shop settings, Checkout JS. The widget injects it into the page.

conversionTrackingCodestring | null

HTML the merchant added for conversion tracking.

supportEmailstring

Support email address.

supportUrlstring

Support page URL.

termsAndConditionsstring

URL of the terms the customer accepts at checkout.

localPickupOnlyboolean

true when the shop only offers local pickup.

brandingobject

Logo and colour of the shop.

cartSettingsShopCartSettings

Theme and behaviour of the widget, as the merchant saved them. subblyCart.setSettings overrides these at runtime.

countryobject

Country the shop trades from. Holds id, name, code and currencyCode.

currenciesShopCurrency[]

Currencies the shop sells in.

languagesShopLanguage[]

Languages the shop publishes.

limitsobject

Features the shop's plan allows.

referralSettingsobject | null

Referral programme. Holds enabled, refereeDiscount and referralDiscount.

settingsShopSettings

Checkout behaviour of the shop.

shippingCountriesCountry[]

Countries the shop ships to. Each has id, code, codeIso3, name, regionTitle, regions (each with id, code and name) and scaRequired.

appsShopApp[]

Third-party apps the merchant connected. Each has a type and a properties object: ga has propertyId, google_tag has containerId, facebook_pixel and tiktok_pixel have pixelId and renewalEventEnabled, zendesk has jsSnippet, intercom has intercomId, facebook_login has appId, google_login has clientId, cart_stack has apiKey and scriptUrl, bablic has jsCode and checkoutOnly, and manychat has jsSnippet and widgetId.

Javascript
Javascript
Javascript
Javascript
idstring

ID of the line, as a UUID. Pass it to updateItem and removeItem.

typestring

one_time or subscription.

productIdnumber

ID of the variant on a one-time item, or of the plan on a subscription.

statusstring

active, unavailable or out_of_stock.

productProductVariant | ProductPlan | null

The variant or plan the line points at. The widget always expands it.

productNamestring

Name of the product, as it is shown in the cart.

descriptionstring

Line description, such as the plan name.

quantitynumber

How many units the line holds.

addonboolean

true when the line is an add-on to a subscription in the same cart.

addonDurationnumber | null

How long the add-on runs. null is forever, 1 is once.

amountOffnumber | null

Fixed discount on the line, in the minor unit.

percentOffnumber | null

Percentage discount on the line.

giftCardobject

Gift card recipient. Always an object; the members are null when the line is not a gift card.

bundleobject

Contents of the bundle. items is empty when the line is not a bundle.

optionsSubscriptionSurvey | null

Survey answers for the line. Always null on a one-time item.

metadataMetafield[] | null

Metafields stored on the line.

originstring | null

How the line got into the cart: pre_purchase, mid_purchase, post_purchase, coupon, or null when the customer added it.

createdAtstring

Creation date, as an ISO 8601 string.

updatedAtstring

Last change date, as an ISO 8601 string.

itemIdstring | null

ID of the cart item this amount belongs to. null on the shipping line.

typestring

one_time, subscription, trial_first, gift_card, setup_fee, survey, shipping or addon.

productIdnumber | null

ID of the variant or plan. null on the shipping line.

quantitynumber
How many units are priced.
pricenumber | null

Unit price in the minor unit. null for a dynamic-price bundle with no items yet.

totalnumber
Line total after discount and tax.
subTotalnumber
Line total before discount and tax.
taxAmountnumber
Tax on the line, in the minor unit.
taxRatenumber
Tax rate applied to the line.
taxInclusiveboolean
true when the price already holds the tax.
discountnumber | null
Discount on the line, in the minor unit.
discountsobject[]

Every discount on the line. Each has type, description, total and, sometimes, chargeNow.

chargeNowboolean

true when the line is part of today's payment.

bundleobject | null

Priced bundle contents. null on setup_fee, survey and shipping lines. Holds items, where each entry has itemId, productId, variantId, quantity, quantityTotal, price, subTotal, total, taxAmount, taxRate, taxInclusive, discount and discounts.

subscriptionobject | null

Schedule of a subscription line. Non-null only on subscription and trial_first lines. Holds firstPaymentAt, nextPaymentAt, numberOfShipments and firstShipmentAt.

typestring

coupon, coupon_gift_offer, offer, referral, balance, gift_card or bundle.

descriptionstring
Text shown next to the discount.
totalnumber
Amount taken off, in the minor unit.
chargeNowboolean
true when the discount applies to today's payment.
idnumber
ID of the coupon.
couponIdstring
The code the customer types.
namestring
Name of the coupon.
amountOffnumber | null
Fixed discount, in the minor unit.
percentOffnumber | null
Percentage discount.
durationstring
once, forever or multiple.
durationInMonthsnumber | null
Months the discount runs, when duration is multiple.
behaviorobject
Holds skipPaymentMethodAllowed, true when the coupon lets the customer check out without a payment method.
giftobject | null
Gift offer attached to the coupon. Holds addonDuration (once or forever), amountOff and percentOff.
idnumber
ID of the gift card.
codestring
The code the customer types.
amountnumber
Face value, in the minor unit.
balancenumber
Value left, in the minor unit.
messagestring
Message written on the card.
statusstring
issued, redeemed, partially_used, used, cancelled or expired.
startsAtstring | null
Date the gift starts, as YYYY-MM-DD.
numberOfOrdersnumber | null
How many orders the gift covers.
messagestring | null
Message for the recipient.
recipientEmailstring | null
Email of the recipient.
idnull
Always null on a guest.
userIdnull
Always null on a guest.
createdAtnull
Always null on a guest.
activeSubscriptionsCountnumber
Always 0 on a guest.
firstNamestring | null
First name.
lastNamestring | null
Last name.
emailstring | null
Email address.
marketingConsentboolean | null
true when the guest opted into marketing.
tosConsentAtstring | null
Date the guest accepted the terms, as an ISO 8601 string.
externalIdstring | null
Your own ID for the customer.
idnumber
ID of the address.
firstNamestring
First name.
lastNamestring
Last name.
companyNamestring | null
Company name.
addressOnestring
Street and number.
addressTwostring | null
Second address line.
citystring
City.
zipstring
Postal code.
regionstring
Region name.
regionIdnumber | null
ID of the region.
countrystring
Country name.
countryIdnumber
ID of the country.
countryCodestring
Two-letter country code.
phonestring
Phone number.
idnumber
ID of the pickup record.
firstNamestring
First name.
lastNamestring
Last name.
phonestring
Phone number.
pickupPointobject | null

The point itself: id, externalId, address1, address2, city, zip, countryId, countryCode, type (mondial_relay), createdAt and updatedAt.

idnumber
ID of the method.
typestring
shipping_option, local_delivery or local_pickup.
shippingFeenumber
Fee charged today, in the minor unit.
futureShippingFeenumber
Fee on later shipments, in the minor unit.
prohibitedProductsnumber[]
IDs of products the method cannot carry.
methodobject

Details of the method. A shipping_option has duration, name and type (flat_price, product, price, weight or dynamic); a local_delivery has comment, duration and name; a local_pickup holds the pickup point.

carrierShippingCarrier | null
shipping_option only. The carrier: id, name and serviceCodes.
carrierIdnumber | null
shipping_option only. ID of the carrier.
servicestring | null
shipping_option only. Carrier service code.
customsFeenumber
shipping_option only. Customs fee charged today.
futureCustomsFeenumber
shipping_option only. Customs fee on later shipments.
idnumber
ID of the payment method.
typestring

card, paypal, us_bank_account, bancontact, sofort, ideal, cashapp, link, sepa_debit or acss_debit.

identifierstring
Label shown in the widget.
createdAtstring | null
Creation date, as an ISO 8601 string.
cardobject | null
Card details: brand, lastFour, expiryMonth, expiryYear and type.
usBankAccountobject | null
Bank details: accountHolderType, accountType, bankName, email, last4, name and routingNumber.
acssDebitobject | null
Canadian debit details: email, name, bankName, lastFour, institutionNumber and transitNumber.
bancontactobject | null
Holds email and name.
cashappobject | null
Holds email, name, buyerId and cashTag.
idealobject | null
Holds bank, bic, email and name.
linkobject | null
Holds email and name.
sepaDebitobject | null
Holds bank_code, branch_code, country, email, ibanLast4 and name. These are the only snake_case keys in the API.
sofortobject | null
Holds country, email and name.
idnumber
ID of the stored value set.
metadataIdnumber
ID of the metafield definition.
namestring
Name of the metafield.
slugstring
Slug of the metafield.
descriptionstring | null
Description shown to the customer.
unitstring | null
Unit of the value.
accessLevelstring
private or storefront.
dataTypestring

single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

saveBehaviorstring
customer or subscription.
editableboolean
true when the customer can change the value.
multipleboolean
true when the metafield takes several values.
presetboolean
true when the values come from a fixed list.
variantboolean
true when the metafield varies per variant.
valuesobject[]

The stored values. Each has id, value (always a string, whatever dataType says), valueId and metadata, an object with imageUrl and color.

brandColourstring | null
Brand colour. The widget uses it as the accent when no accent colour is set.
faviconstring | null
Favicon URL.
logoSquarestring | null
Square logo URL.
namestring
Name of the currency.
symbolstring
Symbol of the currency.
htmlstring
HTML entity of the symbol.
abbreviationstring
ISO 4217 code. Pass this to setCurrency.
gatewaysShopGateway[]

Payment gateways that take this currency. Each has name (stripe, braintree, paypal or authorize_net), type (card or paypal) and connectable, whose keys depend on the gateway: Stripe has isoCountryCode and publishableKey, Braintree has authorizeKey and paypal, PayPal has clientId and merchantId, and Authorize.Net has apiLoginId, publicKey and sandbox.

codestring
Two-letter code. Pass this to setLanguage.
namestring
Name of the language.
primaryboolean
true on the shop's main language.
publishedboolean
true when customers can pick it.
currencyPositionnumber
1 puts the currency symbol before the amount, 0 after it.
dictionaryobject
Translations the widget uses, keyed by section and then by phrase.
checkoutWidgetboolean
The widget itself.
configurableBundlesboolean
Bundles the customer builds.
embedCheckoutboolean
Checkout inside the widget.
onboardingTemplatesboolean
Onboarding templates.
outOfStockboolean
Out-of-stock handling.
whiteLabelingboolean
Subbly branding removed.
allowCheckoutDiscountsboolean
Discount fields are shown at checkout.
allowCouponDiscountboolean
Coupons are accepted.
allowGiftCardDiscountboolean
Gift cards are accepted.
allowMultipleSubscriptionsboolean
A customer can hold more than one subscription.
applePayboolean
Apple Pay is offered.
googlePayboolean
Google Pay is offered.
stripeLinkboolean
Stripe Link is offered.
cancellationRequestEnabledboolean
Customers can ask to cancel.
cancellationTypestring
immediate or end_of_period.
collectBillingAddressboolean
Checkout asks for a billing address.
collectBuyerNameboolean
Checkout asks for the buyer's name.
collectCompanyNameboolean
Checkout asks for a company name.
collectGiftRecipientEmailboolean
Checkout asks for the recipient's email on a gift.
displayCommitmentAndTrialboolean
Commitment and trial terms are shown.
facebookConversionEnabledboolean
Facebook conversion tracking is on.
tiktokConversionEnabledboolean
TikTok conversion tracking is on.
giftDurationEnabledboolean
The buyer picks how long a gift runs.
giftStartDateEnabledboolean
The buyer picks the gift start date.
groupProductVariantsboolean
Variants are grouped in the widget.
lastPaymentMethodDetachmentEnabledboolean
The last payment method can be removed.
limitCouponAndReferralDiscountboolean
A coupon and a referral discount cannot stack.
localPickupOnlyboolean
Only local pickup is offered.
marketingConsentRequiredboolean
Marketing consent is required.
tosConsentRequiredboolean
Terms consent is required.
outOfStockEnabledboolean
Out-of-stock products stay visible.
phoneNumberOptionalboolean
The phone number is optional.
registerWithoutPasswordboolean
Customers sign up without a password.
scaEnabledboolean
Strong customer authentication is on.
skipPaymentMethodWithGiftCardboolean
A gift card that covers the cart skips the payment method.
subscriptionAddonsboolean
Add-ons can join a subscription.
subscriptionQuantitySelectorboolean
The quantity selector is shown on subscriptions.
subscriptionStartDateEnabledboolean
The customer picks the start date.
syncOrdersPreferencesOnSubscriptionUpdateboolean
Open orders follow a subscription change.
taxEnabledboolean
Tax is calculated.
taxInclusiveboolean
Prices hold the tax.
zeroChargeNotificationboolean
The customer is told when today's charge is zero.
dimensionUnitstring
cm or in.
weightUnitstring
lb, oz, g or kg.
timezonestring | null
Timezone of the shop.
stripePaymentMethodTypesstring[]
Stripe payment method types the shop accepts.
idnumber
ID of the variant.
namestring
Name of the variant.
descriptionstring | null
Description of the variant.
pricenumber
Price in the minor unit of the currency, such as cents.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the variant is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing: id, type and ranges, where each range is id, amount and range.
optionsobject[]
Variant options. Each has id, name and value.
attributesMetafield[]
Variant attributes, shaped like metadata.
metadataMetafield[] | null
Metafields of the variant.
parentProductOneTime
The product the variant belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the plan.
namestring
Name of the plan.
descriptionstring | null
Description of the plan.
pricingNamestring | null
Name of the pricing the plan belongs to.
planHashstring | null
Hash that identifies the plan in checkout links.
pricenumber
Price per billing period, in the minor unit.
setupFeenumber | null
One-off fee charged with the first payment.
trialLengthnumber | null
Trial length in billing periods.
trialLengthDaysnumber | null
Trial length in days.
trialPricenumber | null
Price of the trial.
frequencyCountnumber
How many frequency units sit between two payments.
frequencyUnitstring
day, week or month.
commitmentBillingCountnumber
Payments the customer commits to.
chargesLimitnumber | null
Total payments before the subscription ends.
chargeImmediatelyboolean
true when the first payment is taken at checkout.
shipImmediatelyboolean
true when the first shipment goes out at once.
shippingsobject[]
Shipment schedule. Each entry has id, shippingAt, addCount, addUnit, createdAt and updatedAt.
cutOffAtstring | null
Date the current shipment window closes.
preOrderEndAtstring | null
Date the pre-order window closes.
rebillingStartAtstring | null
Date recurring billing starts.
stockCountnumber | null
Units left, or null when stock is not tracked.
bundlePlanIdnumber | null
ID of the bundle plan, when the plan is sold inside a bundle.
priceSchemeobject | null
Quantity-based pricing, shaped as on a variant.
surveySurvey | null
Survey the customer fills in for this plan.
metadataMetafield[] | null
Metafields of the plan.
parentProductSubscription
The product the plan belongs to.
createdAtstring
Creation date, as an ISO 8601 string.
idnumber
ID of the product.
typestring
one_time or subscription.
namestring
Name of the product.
slugstring
Slug of the product.
descriptionstring | null
Description of the product.
deliveryInfostring | null
Delivery text shown in the widget.
digitalboolean
true when the product needs no shipping.
giftingEnabledboolean
true when the product can be bought as a gift.
collectShippingAddressboolean
true when checkout asks for a shipping address.
imagesobject[]
Product images. Each has id, url, order, createdAt and updatedAt.
bundleBundle | null
The bundle the product builds, when it is a bundle product.
bundleIdnumber | null
ID of that bundle.
bundleRulesetIdnumber | null
ID of the ruleset the bundle follows.
metadataMetafield[] | null
Metafields of the product.
createdAtstring
Creation date, as an ISO 8601 string.
giftCardboolean
One-time products only. true when the product is a gift card.
giftCardExpirationnumber | null
One-time products only. Days until the gift card expires.
optionsobject[]
One-time products only. Each option has id, name and values.
variantsProductVariant[]
One-time products only. Every variant of the product.
setupFeenumber
Subscription products only. Default setup fee.
preOrderEndAtstring | null
Subscription products only. Date the pre-order window closes.
plansProductPlan[]
Subscription products only. Every plan of the product. pricings is a deprecated alias.
customerEmailstring | null
Email of the recipient.
customerNamestring | null
Name of the recipient.
messagestring | null
Message for the recipient.
itemsBundleItem[]

Products inside the bundle. Each has id, productId, product (a ProductVariant), quantity, extraPrice, position, stockCount, settings, createdAt and updatedAt.

preferencesobject[]

Bundle preferences. Each has attributeId and values, an array of attribute value IDs.

surveyIdnumber
ID of the survey.
itemsCountnumber
How many products the answers select.
dataobject[]

The answers. Each entry has questionId and answers, an array of { content }, { id } or { id, quantity } objects.

itemsobject[]

Products the answers resolve to. Each has id, productId and surveyId.