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

Shop

Settings, branding, currencies, and gateways of the shop.

subbly.shop.load()

Loads the settings, branding, currencies, gateways and apps of the shop.

Subbly.init calls this for you, so subbly.shop already holds the fields below by the time you get the SDK instance. Call it again only to pick up a change.

subbly.shop is a model object: it carries the shop fields and the load method together. load copies the response onto that same object and returns it, so the value you get back and subbly.shop are one object.

ReturnsPromise<SubblyShop>

The shop object, with its fields refreshed.

Load the shop
const shop = await subbly.shop.load() console.log(shop.name, shop.country.currencyCode)
Read a setting before you draw a form
if (subbly.shop.settings.collectCompanyName) { showCompanyNameField() } const currencies = subbly.shop.currencies.map((c) => c.abbreviation)
Last modified on September 15, 2026
shopIdnumber

ID of the shop.

namestring

Name of the shop.

slugstring

URL-safe name of the shop.

urlstring

Address of the shop's storefront.

checkoutUrlstring

Address of the Subbly-hosted checkout.

statusboolean

Whether the shop is open for business.

livemodeboolean

false while the shop runs in test mode.

localPickupOnlyboolean

Whether the shop only lets customers collect their orders.

supportEmailstring

Support address of the shop.

supportUrlstring

Support page of the shop.

termsAndConditionsstring

Address of the shop's terms.

checkoutJsstring | null

Custom JavaScript the shop runs on checkout.

conversionTrackingCodestring | null

Custom tracking code the shop runs after a purchase.

countryShopCountry

Where the shop trades from.

shippingCountriesCountry[]

The countries the shop ships to. subbly.countries.list returns every country Subbly knows; this is the shorter list you should offer at checkout.

currenciesShopCurrency[]

The currencies the shop sells in, each with its payment gateways.

languagesShopLanguage[]

The languages the shop publishes, with their translations.

appsShopApp[]

The tracking and support apps the shop turned on. Narrow on type.

brandingobject

The shop's look.

limitsShopLimits

What the shop's Subbly plan allows.

settingsShopSettings

What the storefront may collect and offer. Read these before you draw a form.

cartSettingsShopCartSettings

The look and behaviour of the Subbly cart widget. Read them to match your own cart to the shop's design.

referralSettingsobject | null

The shop's referral programme. null when the shop has none.

Javascript
Javascript
idnumber

Country ID.

namestring

Country name.

codestring

Country code, as two ISO letters.

currencyCodestring

Base currency of the shop, such as USD.

idnumber

ID of the country. Send it as countryId.

codestring

Country code, as two ISO letters.

codeIso3string

Country code, as three ISO letters.

namestring

Name of the country.

regionTitlestring

What a region is called here, such as State.

regionsCountryRegion[]

The regions of the country. Empty when the country has none.

idnumber

ID of the region. Send it as regionId.

codestring

Short code of the region.

namestring

Name of the region.

scaRequiredboolean

Whether cards from this country need Strong Customer Authentication.

namestring

Name of the currency.

symbolstring

Symbol of the currency, such as $.

htmlstring

The symbol as an HTML entity.

abbreviationstring

Currency code, such as USD. Pass it to subbly.setCurrency and to subbly.wallet.list.

gatewaysShopGateway[]

The gateways that take this currency.

idnumber

ID of the gateway. Send it as gatewayId to the wallet methods.

nameGATEWAY_NAME

Which gateway it is: stripe, braintree, paypal or authorize_net.

type'card' | 'paypal'

What the gateway collects.

livemodeboolean

false while a Stripe gateway runs in test mode.

connectableobject

The public keys the gateway widget needs. Stripe gives publishableKey and isoCountryCode. Braintree gives authorizeKey and paypal. PayPal gives clientId and merchantId. Authorize.net gives apiLoginId, publicKey and sandbox.

codestring

Language code. Pass it to subbly.setLanguage.

namestring

Name of the language.

primaryboolean

Whether it is the shop's main language.

publishedboolean

Whether customers can choose it.

currencyPositionnumber

1 puts the currency symbol before the amount, 0 after it.

dictionaryRecord<string, string>

The translated strings, keyed by phrase.

typestring

Which app it is: ga (GA4), google_tag (Google Tag Manager), facebook_pixel, tiktok_pixel, zendesk, intercom, facebook_login, google_login, cart_stack, bablic or manychat.

propertiesobject

The app's settings. ga gives propertyId. google_tag gives containerId. facebook_pixel and tiktok_pixel give pixelId and renewalEventEnabled. zendesk gives jsSnippet. intercom gives intercomId. facebook_login gives appId. google_login gives clientId. cart_stack gives apiKey and scriptUrl. bablic gives jsCode and checkoutOnly. manychat gives jsSnippet and widgetId.

brandColourstring | null

Brand colour, as a CSS colour.

faviconstring | null

URL of the favicon.

logoSquarestring | null

URL of the square logo.

checkoutWidgetboolean

Whether the shop may use the checkout widget.

configurableBundlesboolean

Whether customers may build their own bundles.

embedCheckoutboolean

Whether the shop may embed the checkout in its own page.

onboardingTemplatesboolean

Whether the shop may use onboarding templates.

outOfStockboolean

Whether back-in-stock alerts work. subbly.stock.subscribe needs this.

whiteLabelingboolean

Whether the shop may hide Subbly's branding.

allowCouponDiscountboolean

Whether the cart takes coupon codes.

allowGiftCardDiscountboolean

Whether the cart takes gift cards.

allowMultipleSubscriptionsboolean

Whether one customer may hold more than one subscription.

applePayboolean

Whether Apple Pay is on.

googlePayboolean

Whether Google Pay is on.

collectBillingAddressboolean

Whether checkout asks for a billing address.

collectBuyerNameboolean

Whether checkout asks for the buyer's name.

collectCompanyNameboolean

Whether an address form asks for a company name.

collectGiftRecipientEmailboolean

Whether a gift asks for the recipient's email.

displayCommitmentAndTrialboolean

Whether to show commitment and trial terms with a plan.

facebookConversionEnabledboolean

Whether Subbly sends conversions to Facebook.

giftDurationEnabledboolean

Whether a gift may run for a set number of orders.

giftStartDateEnabledboolean

Whether a gift may start on a chosen date.

limitCouponAndReferralDiscountboolean

Whether a coupon and a referral discount may stack.

localPickupOnlyboolean

Whether customers may only collect their orders.

marketingConsentRequiredboolean

Whether the customer must agree to marketing email.

outOfStockEnabledboolean

Whether customers may ask for a back-in-stock alert.

phoneNumberOptionalboolean

Whether an address may leave out the phone number.

registerWithoutPasswordboolean

Whether a customer may register without choosing a password.

scaEnabledboolean

Whether Strong Customer Authentication runs on card payments.

skipPaymentMethodWithGiftCardboolean

Whether a gift card that covers the total skips the payment step.

stripePaymentMethodTypesstring[]

The Stripe payment methods the shop accepts.

subscriptionAddonsboolean

Whether customers may add add-ons to a subscription.

subscriptionQuantitySelectorboolean

Whether customers may change the quantity of a subscription.

subscriptionStartDateEnabledboolean

Whether customers may choose a start date.

taxEnabledboolean

Whether the shop charges tax.

taxInclusiveboolean

Whether prices already include tax.

timezonestring | null

The shop's timezone.

tosConsentRequiredboolean

Whether the customer must accept the terms.

zeroChargeNotificationboolean

Whether Subbly emails the customer about a zero-value charge.

accentColorstring | null

Colour of the highlighted parts.

addressStreetNumberRule'warn' | 'require' | null

What to do when an address has no street number.

afterItemAdded'notify' | 'summary' | 'checkout' | 'close' | null

What the widget does once an item goes in the cart.

backgroundColorstring | null

Background of the page behind the widget.

buttonStylenumber | null

Numbered preset for the buttons.

cardBackgroundColorstring | null

Background of a card.

cardBorderColorstring | null

Border colour of a card.

cardDividerColorstring | null

Colour of the line inside a card.

cardStylenumber | null

Numbered preset for the cards.

checkoutLayoutOneStepboolean

Whether checkout runs on one page rather than several.

disableSummaryViewboolean

Whether the cart summary view is off.

existingSubscriptionsNoticeboolean

Whether to warn a customer who already subscribes.

fontColorPrimarystring | null

Colour of the main text.

fontColorSecondarystring | null

Colour of the secondary text.

fontStylestring | null

Font family of the widget.

footerBackgroundstring | null

Background of the footer.

footerFontColorstring | null

Text colour in the footer.

headerBackgroundColorstring | null

Background of the header.

headerFontColorstring | null

Text colour in the header.

headerHeightnumber | null

Height of the header, in pixels.

hideBundleItemsboolean

Whether to hide the items inside a bundle.

hideCouponFromCartSummaryboolean

Whether to hide the coupon field in the summary.

hidePricingPriceboolean

Whether to hide the plan price.

inputBackgroundstring | null

Background of an input.

inputBorderColorstring | null

Border colour of an input.

inputFontColorstring | null

Text colour inside an input.

localizationSettingsboolean

Whether the widget shows a language and currency picker.

logoUrlstring | null

URL of the logo in the widget.

removeTrailingZeroesboolean | null

Whether to print $10 rather than $10.00.

segmentControlBackgroundstring | null

Background of the segmented control.

widgetBackgroundColorstring | null

Background of the widget.

widgetBackgroundDarkerstring | null

Darker background used for panels inside the widget.

widgetView'pop-up' | 'fullscreen'

How the widget opens.

itemAddedScreenboolean

Older switch for the item-added screen. Read afterItemAdded instead.

enabledboolean

Whether referrals are on. subbly.customers.referral needs this.

refereeDiscountnumber

Discount the new customer gets.

referralDiscountnumber

Discount the referring customer gets.