SubblySubbly
Log inGet started
  • Get started
  • Developer resources
Developer resources
Subbly.js SDK
    InstallConfigureKeep it up to dateBuild a checkoutHandle errorsRun a funnel
SubblyCart.js widget
    InstallConfigureKeep it up to dateWire it into your pageDrive it from your codeStyle it
Subbly.js SDK

Install Subbly.js

Subbly.js ships as an npm package and as a browser bundle. Pick one, then start the SDK with Subbly.init.

Install from npm

TerminalInstall the package
npm install @subbly/sdk

Import it with ES modules. This is the way to use Subbly.js with a modern JavaScript framework, such as React or Vue. The package ships its own TypeScript types.

Start the SDK
import Subbly from '@subbly/sdk' const subbly = await Subbly.init({ apiKey: 'API_KEY', })

Subbly.init is the only supported entry point. It loads the shop before it resolves, so subbly.shop is ready when you get the instance. Call it once per page: the SDK keeps one shared HTTP client, and a second call with a different key quietly reuses the first one.

Load from a CDN

The package also ships a browser bundle. Load it on your HTML page and it defines the global Subbly. window.Subbly is the class, not an instance, so you still call Subbly.init. Load it once per page.

Load the script
<script src="https://cdn.jsdelivr.net/npm/@subbly/sdk"></script> <script> window.Subbly.init({ apiKey: 'API_KEY' }).then((subbly) => { // access Subbly SDK methods }) </script>

Next steps

  • Configure — every option Subbly.init takes.
  • Keep it up to date — pin a version before you go to production.
Last modified on September 14, 2026
On this page
  • Install from npm
  • Load from a CDN
  • Next steps
Javascript