SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Subbly.js SDK reference
Docs
Information
    CookiesAmounts and datesCurrencyExpand parametersErrors
Setup
    Start the SDKSet the currencySet the languageVersionConfiguration
Addresses
    List the addressesAdd an addressDelete an address
Authentication
    Authentication stateCheck the authenticationLog in with a passwordRegister a customerCheck if an email is registeredSend a one-time passwordLog in with a one-time passwordLog in with single sign-onLog outGet the access token
Bundles
    List the bundlesLoad a bundleLoad the bundle itemsLoad the bundle groupsQuote a bundle
Cart
    Create a cartLoad a cartUpdate the cartAdd an itemUpdate an itemRemove an itemGet the start datesGet the gifting datesGet the shipping methodsGet the pick-up pointsAttach the customer
Checkout
    Purchase the cart
Countries
    List the countries
Customers
    Get the customer profileUpdate the customerGet the referral link
Funnels
    Get a pre-purchase offerAccept a pre-purchase offerSkip a pre-purchase offerReset the pre-purchase offersGet a mid-purchase offerAccept a mid-purchase offerSkip a mid-purchase offerGet a post-purchase offerAccept a post-purchase offerSkip a post-purchase offer
Leads
    Capture a lead
Metafields
    List the metafields
Payment intents
    Get a payment intentConfirm a payment intent
Pick-up info
    List the pick-up infosAdd a pick-up infoDelete a pick-up info
Products
    List the productsLoad a productLoad a variantLoad a plan
Shop
    Load the shop
Stock notifications
    Get a back-in-stock alert
Subscriptions
    List the subscriptionsLoad a subscriptionUpdate a subscriptionUpdate the survey preferencesUpdate the bundleLoad a subscription itemUpdate a subscription itemUpdate an item bundleUpdate the item survey preferences
Surveys
    Load a survey
Wallet
    List the payment methodsStart a payment setupAdd a payment methodStart a 3-D Secure setup

Products

List the products, and load a product, a variant, or a plan.

A shop sells two kinds of product. A one-time product holds variants; a subscription product holds plans. A parent product is what you list and show on a page; a variant or a plan is what a customer buys, and its id is the productId you send to subbly.cart.addItem.

Every method here takes an optional headers argument to price one response in another currency; see Currency.

subbly.products.list(params?, headers?)

Gets a page of the shop's parent products.

Method parameters

paramsoptionalProductsListParams

Which products to return.

headersoptionalProductRequestHeaders

Extra request headers, such as x-currency.

ReturnsPromise<ProductsListResponse>

One page of products.

List the products
const { data, pagination } = await subbly.products.list({ page: 1, perPage: 10, expand: ['variants.parent'] })
List the subscription products only
const { data } = await subbly.products.list({ type: 'subscription', expand: ['plans'] })

subbly.products.load(productId, params?, headers?)

Loads one parent product, with its variants or its plans.

Method parameters

productIdRequirednumber

ID of the parent product.

paramsoptionalProductsResourceParams

Extra data to include.

headersoptionalProductRequestHeaders

Extra request headers, such as x-currency.

ReturnsPromise<ParentProduct>

The product. Narrow on type to read variants or plans.

Load a product
const product = await subbly.products.load(123, { expand: ['variants.parent', 'plans.parent'] }) const buyable = product.type === 'subscription' ? product.plans : product.variants

subbly.products.loadVariant(productId, params?, headers?)

Loads one product variant, the buyable child of a one-time product.

Pass a variant ID, not the ID of its parent. The endpoint behind this method also serves plans, so the declared result is a variant or a plan; use subbly.products.loadPlan when you hold a plan ID.

Method parameters

productIdRequirednumber

ID of the variant.

paramsoptionalProductsResourceParams

Extra data to include.

headersoptionalProductRequestHeaders

Extra request headers, such as x-currency.

ReturnsPromise<Product>

The variant, or the plan when the ID belongs to one.

Load a variant
const variant = await subbly.products.loadVariant(456, { expand: ['parent'] }) await subbly.cart.addItem({ productId: variant.id, quantity: 1 })

subbly.products.loadPlan(productId, params?, headers?)

Loads one subscription plan, the buyable child of a subscription product. Older material calls a plan a pricing.

loadPlan and loadVariant call the same endpoint; only the type of the result differs. Use loadPlan when the ID belongs to a plan.

Method parameters

productIdRequirednumber

ID of the plan.

paramsoptionalProductsResourceParams

Extra data to include.

headersoptionalProductRequestHeaders

Extra request headers, such as x-currency.

ReturnsPromise<ProductPlan>

The plan.

Load a plan
const plan = await subbly.products.loadPlan(789, { expand: ['parent'] }) console.log(plan.frequencyCount, plan.frequencyUnit)
Last modified on September 15, 2026
pageoptionalnumber

Page to return, counted from 1.

perPageoptionalnumber

How many products per page.

tagsoptionalstring[]

Keep only products with these tags.

typeoptional'one_time' | 'subscription'

Keep only one-time products, or only subscription products.

slugsoptionalstring[]

Keep only products with these slugs.

digitaloptionalboolean

true keeps only digital products, false only physical ones.

giftCardoptionalboolean

true keeps only gift cards, false leaves them out.

expandoptionalstring[]

Relations to include: variants, variants.parent, plans, plans.parent and metadata. Without them a product carries no buyable children.

dataParentProduct[]

The products on this page. Each one is a one-time product or a subscription product; narrow on type.

paginationPagination

Where this page sits in the full list.

currentPagenumber

The page you are on, counting from 1.

fromnumber

Index of the first row on this page.

tonumber

Index of the last row on this page.

lastPagenumber

The number of pages.

totalnumber

The number of rows across every page.

Javascript
Javascript
expandoptionalstring[]

Relations to include: variants, variants.parent, plans, plans.parent and metadata.

type'one_time'

Narrow the union on this field. one_time products carry variants.

idnumber

ID of the product. Pass it to subbly.products.load.

namestring

Name of the product.

slugstring

URL-safe name of the product. Filter on it with the slugs parameter.

descriptionstring | null

Description of the product, as HTML.

deliveryInfostring | null

Delivery note shown with the product.

digitalboolean

Whether the product ships or is delivered online.

giftingEnabledboolean

Whether a customer may buy the product as a gift.

collectShippingAddressboolean

Whether checkout asks for a shipping address for this product.

imagesProductImage[]

Images of the product, in display order.

metadataMetafield[] | null

Metafield values saved on the product. Ask for the metadata expand to get them.

bundleBundle | null

The bundle the product sells, when the product is a bundle.

bundleIdnumber | null

ID of that bundle.

bundleRulesetIdnumber | null

The bundle ruleset the product uses.

createdAtstring

When the product was created.

giftCardboolean

Whether the product is a gift card.

giftCardExpirationnumber | null

How many days a gift card stays valid.

optionsProductOption[]

The options the variants are built from, such as size and colour.

variantsProductVariant[]

The buyable variants. Ask for the variants expand to get them.

type'subscription'

Narrow the union on this field. subscription products carry plans.

idnumber

ID of the product. Pass it to subbly.products.load.

namestring

Name of the product.

slugstring

URL-safe name of the product. Filter on it with the slugs parameter.

descriptionstring | null

Description of the product, as HTML.

deliveryInfostring | null

Delivery note shown with the product.

digitalboolean

Whether the product ships or is delivered online.

giftingEnabledboolean

Whether a customer may buy the product as a gift.

collectShippingAddressboolean

Whether checkout asks for a shipping address for this product.

imagesProductImage[]

Images of the product, in display order.

metadataMetafield[] | null

Metafield values saved on the product. Ask for the metadata expand to get them.

bundleBundle | null

The bundle the product sells, when the product is a bundle.

bundleIdnumber | null

ID of that bundle.

bundleRulesetIdnumber | null

The bundle ruleset the product uses.

createdAtstring

When the product was created.

setupFeenumber

One-off fee charged with the first payment, in the minor unit of the currency.

preOrderEndAtstring | null

When the pre-order window closes.

plansProductPlan[]

The buyable plans. Ask for the plans expand to get them.

pricingsProductPlan[]

The same plans under their old name. Read plans instead.

Javascript
expandoptionalstring[]

Relations to include. parent loads the product the variant belongs to.

idnumber

ID of the variant. Send it as productId when you add the item to a cart.

namestring

Name of the variant, such as Large.

descriptionstring | null

Description of the variant.

pricenumber

Price of one unit, in the minor unit of the currency.

stockCountnumber | null

Units left. null means the shop does not track stock for this variant.

optionsProductVariantOption[]

The option values that make this variant, such as size and colour.

attributesMetafield[]

Attributes of the variant. Bundle filters and bundle preferences match on these.

metadataMetafield[] | null

Metafield values saved on the variant. Ask for the metadata expand to get them.

parentProductOneTime

The product the variant belongs to. Ask for the parent expand to get it.

bundlePlanIdnumber | null

The bundle plan this variant prices, when the variant belongs to a bundle.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

createdAtstring

When the variant was created.

idnumber

ID of the plan. Send it as productId when you add the subscription to a cart.

namestring

Name of the plan, such as Monthly.

pricingNamestring | null

Older name of the plan. Subbly called plans pricings before.

descriptionstring | null

Description of the plan.

pricenumber

Price of one billing period, in the minor unit of the currency.

setupFeenumber | null

One-off fee charged with the first payment.

frequencyCountnumber

How many frequencyUnit periods sit between two payments.

frequencyUnit'day' | 'week' | 'month'

The unit of the billing period.

chargeImmediatelyboolean

Whether the first payment is taken at checkout.

shipImmediatelyboolean

Whether the first shipment goes out at once.

chargesLimitnumber | null

How many payments the subscription takes before it ends. null means it runs until the customer cancels.

commitmentBillingCountnumber

How many payments the customer commits to before they may cancel.

trialLengthnumber | null

Length of the trial, in days.

trialPricenumber | null

Price of the trial, in the minor unit of the currency.

trialLengthDaysnumber | null

The trial length again, in days. Survey answers carry this name.

cutOffAtstring | null

The moment after which a new customer joins the next cycle rather than this one.

preOrderEndAtstring | null

When the pre-order window closes.

rebillingStartAtstring | null

When regular billing starts, for a plan that begins on a fixed date.

planHashstring | null

Internal hash of the plan settings.

stockCountnumber | null

Units left. null means the shop does not track stock for this plan.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

bundlePlanIdnumber | null

The bundle plan this plan prices, when the plan belongs to a bundle.

surveySurvey | null

The survey the customer answers when they buy the plan. Load the questions with subbly.surveys.load, then send the answers as options on the cart item.

shippingsProductShipping[]

The fixed shipment dates of the plan, for a shop that ships on a calendar rather than on the billing date.

metadataMetafield[] | null

Metafield values saved on the plan. Ask for the metadata expand to get them.

parentProductSubscription

The product the plan belongs to. Ask for the parent expand to get it.

createdAtstring

When the plan was created.

Javascript
expandoptionalstring[]

Relations to include. parent loads the product the plan belongs to.

idnumber

ID of the plan. Send it as productId when you add the subscription to a cart.

namestring

Name of the plan, such as Monthly.

pricingNamestring | null

Older name of the plan. Subbly called plans pricings before.

descriptionstring | null

Description of the plan.

pricenumber

Price of one billing period, in the minor unit of the currency.

setupFeenumber | null

One-off fee charged with the first payment.

frequencyCountnumber

How many frequencyUnit periods sit between two payments.

frequencyUnit'day' | 'week' | 'month'

The unit of the billing period.

chargeImmediatelyboolean

Whether the first payment is taken at checkout.

shipImmediatelyboolean

Whether the first shipment goes out at once.

chargesLimitnumber | null

How many payments the subscription takes before it ends. null means it runs until the customer cancels.

commitmentBillingCountnumber

How many payments the customer commits to before they may cancel.

trialLengthnumber | null

Length of the trial, in days.

trialPricenumber | null

Price of the trial, in the minor unit of the currency.

trialLengthDaysnumber | null

The trial length again, in days. Survey answers carry this name.

cutOffAtstring | null

The moment after which a new customer joins the next cycle rather than this one.

preOrderEndAtstring | null

When the pre-order window closes.

rebillingStartAtstring | null

When regular billing starts, for a plan that begins on a fixed date.

planHashstring | null

Internal hash of the plan settings.

stockCountnumber | null

Units left. null means the shop does not track stock for this plan.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

bundlePlanIdnumber | null

The bundle plan this plan prices, when the plan belongs to a bundle.

surveySurvey | null

The survey the customer answers when they buy the plan. Load the questions with subbly.surveys.load, then send the answers as options on the cart item.

shippingsProductShipping[]

The fixed shipment dates of the plan, for a shop that ships on a calendar rather than on the billing date.

metadataMetafield[] | null

Metafield values saved on the plan. Ask for the metadata expand to get them.

parentProductSubscription

The product the plan belongs to. Ask for the parent expand to get it.

createdAtstring

When the plan was created.

Javascript
type'one_time'

Narrow the union on this field. one_time products carry variants.

idnumber

ID of the product. Pass it to subbly.products.load.

namestring

Name of the product.

slugstring

URL-safe name of the product. Filter on it with the slugs parameter.

descriptionstring | null

Description of the product, as HTML.

deliveryInfostring | null

Delivery note shown with the product.

digitalboolean

Whether the product ships or is delivered online.

giftingEnabledboolean

Whether a customer may buy the product as a gift.

collectShippingAddressboolean

Whether checkout asks for a shipping address for this product.

imagesProductImage[]

Images of the product, in display order.

metadataMetafield[] | null

Metafield values saved on the product. Ask for the metadata expand to get them.

bundleBundle | null

The bundle the product sells, when the product is a bundle.

bundleIdnumber | null

ID of that bundle.

bundleRulesetIdnumber | null

The bundle ruleset the product uses.

createdAtstring

When the product was created.

giftCardboolean

Whether the product is a gift card.

giftCardExpirationnumber | null

How many days a gift card stays valid.

optionsProductOption[]

The options the variants are built from, such as size and colour.

variantsProductVariant[]

The buyable variants. Ask for the variants expand to get them.

type'subscription'

Narrow the union on this field. subscription products carry plans.

idnumber

ID of the product. Pass it to subbly.products.load.

namestring

Name of the product.

slugstring

URL-safe name of the product. Filter on it with the slugs parameter.

descriptionstring | null

Description of the product, as HTML.

deliveryInfostring | null

Delivery note shown with the product.

digitalboolean

Whether the product ships or is delivered online.

giftingEnabledboolean

Whether a customer may buy the product as a gift.

collectShippingAddressboolean

Whether checkout asks for a shipping address for this product.

imagesProductImage[]

Images of the product, in display order.

metadataMetafield[] | null

Metafield values saved on the product. Ask for the metadata expand to get them.

bundleBundle | null

The bundle the product sells, when the product is a bundle.

bundleIdnumber | null

ID of that bundle.

bundleRulesetIdnumber | null

The bundle ruleset the product uses.

createdAtstring

When the product was created.

setupFeenumber

One-off fee charged with the first payment, in the minor unit of the currency.

preOrderEndAtstring | null

When the pre-order window closes.

plansProductPlan[]

The buyable plans. Ask for the plans expand to get them.

pricingsProductPlan[]

The same plans under their old name. Read plans instead.

idnumber

ID of the image.

urlstring

URL of the image file.

ordernumber

Position of the image in the gallery.

createdAtstring

When the image was added.

updatedAtstring

When the image last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the option.

namestring

Name of the option, such as Size.

valuesstring[]

Every value the option takes across the variants.

idnumber

ID of the variant. Send it as productId when you add the item to a cart.

namestring

Name of the variant, such as Large.

descriptionstring | null

Description of the variant.

pricenumber

Price of one unit, in the minor unit of the currency.

stockCountnumber | null

Units left. null means the shop does not track stock for this variant.

optionsProductVariantOption[]

The option values that make this variant, such as size and colour.

idnumber

ID of the option.

namestring

Name of the option, such as Size.

valuestring

Value of the option for this variant, such as Large.

attributesMetafield[]

Attributes of the variant. Bundle filters and bundle preferences match on these.

metadataMetafield[] | null

Metafield values saved on the variant. Ask for the metadata expand to get them.

parentProductOneTime

The product the variant belongs to. Ask for the parent expand to get it.

bundlePlanIdnumber | null

The bundle plan this variant prices, when the variant belongs to a bundle.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

createdAtstring

When the variant was created.

idnumber

ID of the image.

urlstring

URL of the image file.

ordernumber

Position of the image in the gallery.

createdAtstring

When the image was added.

updatedAtstring

When the image last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the plan. Send it as productId when you add the subscription to a cart.

namestring

Name of the plan, such as Monthly.

pricingNamestring | null

Older name of the plan. Subbly called plans pricings before.

descriptionstring | null

Description of the plan.

pricenumber

Price of one billing period, in the minor unit of the currency.

setupFeenumber | null

One-off fee charged with the first payment.

frequencyCountnumber

How many frequencyUnit periods sit between two payments.

frequencyUnit'day' | 'week' | 'month'

The unit of the billing period.

chargeImmediatelyboolean

Whether the first payment is taken at checkout.

shipImmediatelyboolean

Whether the first shipment goes out at once.

chargesLimitnumber | null

How many payments the subscription takes before it ends. null means it runs until the customer cancels.

commitmentBillingCountnumber

How many payments the customer commits to before they may cancel.

trialLengthnumber | null

Length of the trial, in days.

trialPricenumber | null

Price of the trial, in the minor unit of the currency.

trialLengthDaysnumber | null

The trial length again, in days. Survey answers carry this name.

cutOffAtstring | null

The moment after which a new customer joins the next cycle rather than this one.

preOrderEndAtstring | null

When the pre-order window closes.

rebillingStartAtstring | null

When regular billing starts, for a plan that begins on a fixed date.

planHashstring | null

Internal hash of the plan settings.

stockCountnumber | null

Units left. null means the shop does not track stock for this plan.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

bundlePlanIdnumber | null

The bundle plan this plan prices, when the plan belongs to a bundle.

surveySurvey | null

The survey the customer answers when they buy the plan. Load the questions with subbly.surveys.load, then send the answers as options on the cart item.

shippingsProductShipping[]

The fixed shipment dates of the plan, for a shop that ships on a calendar rather than on the billing date.

metadataMetafield[] | null

Metafield values saved on the plan. Ask for the metadata expand to get them.

parentProductSubscription

The product the plan belongs to. Ask for the parent expand to get it.

createdAtstring

When the plan was created.

idnumber

ID of the option.

namestring

Name of the option, such as Size.

valuestring

Value of the option for this variant, such as Large.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the shipment rule.

shippingAtstring | null

The date of the shipment.

addCountnumber | null

How many addUnit periods to add for the next shipment.

addUnit'day' | 'week' | 'month'

The unit added for the next shipment.

createdAtstring

When the rule was created.

updatedAtstring

When the rule last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the shipment rule.

shippingAtstring | null

The date of the shipment.

addCountnumber | null

How many addUnit periods to add for the next shipment.

addUnit'day' | 'week' | 'month'

The unit added for the next shipment.

createdAtstring

When the rule was created.

updatedAtstring

When the rule last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the image.

urlstring

URL of the image file.

ordernumber

Position of the image in the gallery.

createdAtstring

When the image was added.

updatedAtstring

When the image last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the option.

namestring

Name of the option, such as Size.

valuesstring[]

Every value the option takes across the variants.

idnumber

ID of the variant. Send it as productId when you add the item to a cart.

namestring

Name of the variant, such as Large.

descriptionstring | null

Description of the variant.

pricenumber

Price of one unit, in the minor unit of the currency.

stockCountnumber | null

Units left. null means the shop does not track stock for this variant.

optionsProductVariantOption[]

The option values that make this variant, such as size and colour.

idnumber

ID of the option.

namestring

Name of the option, such as Size.

valuestring

Value of the option for this variant, such as Large.

attributesMetafield[]

Attributes of the variant. Bundle filters and bundle preferences match on these.

metadataMetafield[] | null

Metafield values saved on the variant. Ask for the metadata expand to get them.

parentProductOneTime

The product the variant belongs to. Ask for the parent expand to get it.

bundlePlanIdnumber | null

The bundle plan this variant prices, when the variant belongs to a bundle.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

createdAtstring

When the variant was created.

idnumber

ID of the image.

urlstring

URL of the image file.

ordernumber

Position of the image in the gallery.

createdAtstring

When the image was added.

updatedAtstring

When the image last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the plan. Send it as productId when you add the subscription to a cart.

namestring

Name of the plan, such as Monthly.

pricingNamestring | null

Older name of the plan. Subbly called plans pricings before.

descriptionstring | null

Description of the plan.

pricenumber

Price of one billing period, in the minor unit of the currency.

setupFeenumber | null

One-off fee charged with the first payment.

frequencyCountnumber

How many frequencyUnit periods sit between two payments.

frequencyUnit'day' | 'week' | 'month'

The unit of the billing period.

chargeImmediatelyboolean

Whether the first payment is taken at checkout.

shipImmediatelyboolean

Whether the first shipment goes out at once.

chargesLimitnumber | null

How many payments the subscription takes before it ends. null means it runs until the customer cancels.

commitmentBillingCountnumber

How many payments the customer commits to before they may cancel.

trialLengthnumber | null

Length of the trial, in days.

trialPricenumber | null

Price of the trial, in the minor unit of the currency.

trialLengthDaysnumber | null

The trial length again, in days. Survey answers carry this name.

cutOffAtstring | null

The moment after which a new customer joins the next cycle rather than this one.

preOrderEndAtstring | null

When the pre-order window closes.

rebillingStartAtstring | null

When regular billing starts, for a plan that begins on a fixed date.

planHashstring | null

Internal hash of the plan settings.

stockCountnumber | null

Units left. null means the shop does not track stock for this plan.

priceSchemeProductPriceScheme | null

Volume pricing, when the shop sets it up. null when the price never changes with quantity.

bundlePlanIdnumber | null

The bundle plan this plan prices, when the plan belongs to a bundle.

surveySurvey | null

The survey the customer answers when they buy the plan. Load the questions with subbly.surveys.load, then send the answers as options on the cart item.

shippingsProductShipping[]

The fixed shipment dates of the plan, for a shop that ships on a calendar rather than on the billing date.

metadataMetafield[] | null

Metafield values saved on the plan. Ask for the metadata expand to get them.

parentProductSubscription

The product the plan belongs to. Ask for the parent expand to get it.

createdAtstring

When the plan was created.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the shipment rule.

shippingAtstring | null

The date of the shipment.

addCountnumber | null

How many addUnit periods to add for the next shipment.

addUnit'day' | 'week' | 'month'

The unit added for the next shipment.

createdAtstring

When the rule was created.

updatedAtstring

When the rule last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the scheme.

typestring

How the scheme works. volume_price lowers the unit price as the quantity grows.

rangesPriceSchemeRange[]

The steps of the scheme.

idnumber

ID of the step.

rangenumber

Quantity at which the step starts.

amountnumber

Unit price from that quantity, in the minor unit of the currency.

idnumber

ID of the shipment rule.

shippingAtstring | null

The date of the shipment.

addCountnumber | null

How many addUnit periods to add for the next shipment.

addUnit'day' | 'week' | 'month'

The unit added for the next shipment.

createdAtstring

When the rule was created.

updatedAtstring

When the rule last changed.

idnumber

ID of the metafield.

metadataIdnumber

ID of the definition this value belongs to.

namestring

Name of the metafield in the Subbly admin.

slugstring

Machine name of the metafield. Use it to find a field by hand.

descriptionstring | null

Help text for the field.

dataTypeMetafieldType

The kind of value the field holds. One of single_line_string, multi_line_text, rich_text, integer, decimal, datetime, date, time, volume, weight, boolean, color, rating, url, money or json.

accessLevel'private' | 'storefront'

Who can read the field. Only storefront fields reach the browser.

saveBehavior'customer' | 'subscription'

Whether the value is saved on the customer or on the subscription.

editableboolean

Whether the customer may change the value.

multipleboolean

Whether the field takes more than one value.

presetboolean

true when the customer picks from values. false when the customer types the value.

variantboolean

Whether the value changes from variant to variant.

unitstring | null

Unit of the value, such as kg.

valuesMetafieldValue[]

The values of the field. A preset field lists the choices; a free-text field lists what the customer wrote.

idnumber

ID of the value. Send this as id when you write a preset metafield.

valueIdnumber

ID of the saved value record.

valuestring | null

The value itself, as text.

metadataobject | null

Presentation of the choice.

imageUrlstring | null

Image for the choice.

colorstring | null

Colour for the choice, as a CSS colour.