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

Countries

The country and region list the shop supports.

subbly.countries.list()

Gets every country Subbly supports, with its regions. Use it to fill a country select, and use the id of the chosen country as countryId in addresses and in subbly.cart.getShippingMethods.

This is the full list. The countries your shop actually ships to are in subbly.shop.shippingCountries, which has the same shape.

ReturnsPromise<Country[]>

The countries.

List the countries
const countries = await subbly.countries.list()
Offer only the countries the shop ships to
const options = subbly.shop.shippingCountries.map(({ id, name }) => ({ value: id, label: name, }))
Last modified on September 15, 2026
idnumber

ID of the country. Pass it as countryId in addresses and shipping lookups.

codestring

Two-letter ISO country code.

codeIso3string

Three-letter ISO country code.

namestring

Country name.

regionTitlestring

What this country calls a region, such as State or Province. Use it as the field label.

regionsCountryRegion[]

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

idnumber

ID of the region. Pass it as regionId.

codestring

Short code of the region.

namestring

Region name.

scaRequiredboolean

true when cards issued in this country need Strong Customer Authentication.

Javascript
Javascript