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

Customers

Read and change the profile of the signed-in customer.

Every method here needs a signed-in customer. Sign one in with the authentication methods first.

subbly.customers.me()

Gets the profile of the signed-in customer. subbly.auth.checkAuthenticated calls it behind the scenes, so a failure here means the token no longer works.

ReturnsPromise<SubblyCustomer>

The customer profile.

Get the customer profile
const customer = await subbly.customers.me()

subbly.customers.update(payload)

Changes the profile of the signed-in customer. Send only the fields you change.

Method parameters

payloadRequiredCustomerUpdatePayload

The fields to change. Every one is optional.

ReturnsPromise<SubblyCustomer>

The updated profile.

Update the customer
const customer = await subbly.customers.update({ firstName: 'Ada', marketingConsent: true, })

subbly.customers.referral()

Gets the referral link of the signed-in customer, to show on a "refer a friend" page. Referrals must be switched on for the shop; check subbly.shop.referralSettings.enabled first.

ReturnsPromise<CustomersReferralResponse>

The referral link.

referralLinkstring

The URL the customer shares.

Get the referral link
const { referralLink } = await subbly.customers.referral()
Last modified on September 15, 2026
idnumber

ID of the customer.

userIdnumber

ID of the user account behind the customer.

emailstring

Email address.

firstNamestring

Given name.

lastNamestring

Family name.

externalIdstring | null

Your own ID for this customer.

marketingConsentboolean

true when the customer agreed to marketing email.

tosConsentAtstring

When the customer accepted the terms.

activeSubscriptionsCountnumber

How many subscriptions are active.

createdAtstring

When the customer record was created.

Javascript
firstNameoptionalstring

Given name.

lastNameoptionalstring

Family name.

marketingConsentoptionalboolean

Whether the customer agreed to marketing email.

tosConsentoptionalboolean

Whether the customer accepted the terms. Sending true stamps tosConsentAt with the current time.

externalIdoptionalstring | null

Your own ID for this customer.

idnumber

ID of the customer.

userIdnumber

ID of the user account behind the customer.

emailstring

Email address.

firstNamestring

Given name.

lastNamestring

Family name.

externalIdstring | null

Your own ID for this customer.

marketingConsentboolean

true when the customer agreed to marketing email.

tosConsentAtstring

When the customer accepted the terms.

activeSubscriptionsCountnumber

How many subscriptions are active.

createdAtstring

When the customer record was created.

Javascript
Javascript