SDKs and CLI

Pick the Smallest Package That Does the Job

Throttle publishes focused packages for checkout embeds, native cart orchestration, discounts, generated REST calls, and command-line setup. Each package card calls out where it is safe to run and whether it is production-ready today.

Environment comes from the credential
Server SDKs do not take a separate environment option for normal API calls. Generate separate keys for Production, Test, UAT, or any custom non-production environment; the raw key is pinned to exactly one workspace environment. Every non-production environment routes to sandbox provider credentials. Clerk-authenticated dashboard calls that are not using an API key send X-Throttle-Environment-Id instead.

@usethrottle/checkout-sdk

Production

Checkout SDK with server-side session/order helpers and a React wrapper for embedded payment.

Server helpers plus browser React component. Secret API key stays server-side.

NodeReactcheckout
Install
npm install @usethrottle/checkout-sdk

@usethrottle/checkout-react

Production

React iframe components for payment-only and full checkout embeds.

Browser React component. Session creation still belongs on your backend.

ReactiframepostMessage
Install
npm install @usethrottle/checkout-react

@usethrottle/cart

Production

Typed server-side client for native carts, line items, discounts, shipping, tax, and checkout.

Server-side only. Requires a secret API key.

Nodecartshipping/tax
Install
npm install @usethrottle/cart

@usethrottle/discounts

Production

Headless server-side client for promotion code preview, management, and cart apply.

Server-side only. Requires a secret API key.

Nodediscountspromotions
Install
npm install @usethrottle/discounts

@usethrottle/subscriptions

Production

Production React hooks, server proxy helpers, and primitives for buyer subscription portals.

Browser hooks through your backend proxy; server helper/client with your secret key.

Reactsubscriptionsbuyer portal
Install
npm install @usethrottle/subscriptions @usethrottle/checkout-react

@usethrottle/invoices

Production

React hooks and server proxy for surfacing a buyer's unified invoice list — card captures, Net-N issuances, and subscription charges — in your storefront portal.

Browser hooks through your backend proxy. The server subpath holds the sk_ key; buyers never call Throttle directly.

Reactinvoicesbuyer portal
Install
pnpm add @usethrottle/invoices

@usethrottle/payment-methods

Production

React hooks, a headless client, and a drop-in wallet component so buyers can list, add, set as default, and remove saved cards — your secret key stays server-side behind a minted client token.

Browser hooks + component gated by a server-minted client token; the server subpath holds the sk_ key. Buyers never touch the secret key.

Reactpayment methodsbuyer portal
Install
npm install @usethrottle/payment-methods

@usethrottle/auth

Production

Buyer accounts for headless storefronts — sign-in, email verification, password reset, addresses, saved cards, orders, invoices and subscriptions, as a headless client, React hooks, or five drop-in forms.

Browser-only, publishable key. The access token lives in memory and never reaches storage; only the rotating refresh token is persisted, through a pluggable adapter.

Reactbuyer accountsauthentication
Install
npm install @usethrottle/auth

@usethrottle/storefront-react

Setup

Drop-in React storefront components for a Throttle product catalog: shop, product page, cart, search and account.

Browser React components with server-safe loaders and Next.js route helpers. Reads display from your catalog settings; the browser key is public, the server key stays on your server.

ReactNext.jsstorefront
Install
npm install @usethrottle/storefront-react @usethrottle/catalog @usethrottle/money

@usethrottle/builder

Setup

Headless Throttle Builder client: published pages, header, footer, slots and site settings, with Next.js cache tags, a signed change-notice receiver and preview mode.

Server reads with a publishable tb_pk_ key of the server channel. Never give it a tb_sk_ secret key; the client refuses one.

NodeNext.jspage builder
Install
npm install @usethrottle/builder

@usethrottle/builder-react

Setup

Renders a Throttle Builder page as React in a Next.js store: provider, header, footer, slots, the page route and the sitemap.

Client entry plus /server loaders and a /next route helper. Images show only from the media origin you pass.

ReactNext.jspage builder
Install
npm install @usethrottle/builder-react @usethrottle/builder

@usethrottle/builder-schema

Setup

The Throttle Builder page document, site settings, limits, widget definitions and edit operations as zod schemas.

Pure TypeScript plus zod 4. No React, no I/O, no Node imports.

TypeScriptzodpage builder
Install
npm install @usethrottle/builder-schema

@usethrottle/storefront-react/builder

Setup

The catalog and commerce widget packs for Throttle Builder: product grids, shelves, carousels, search, cart and account widgets, with their data sources.

A subpath of @usethrottle/storefront-react. Has no "use client", so a server loadSite can run the pack resolvers.

Reactwidgetspage builder
Install
npm install @usethrottle/storefront-react

@usethrottle/create-store

Setup

Scaffold a complete Next.js storefront on @usethrottle/storefront-react, with cache-safe routes.

Node CLI. Asks for the catalog browser key and server key, writes .env.local and installs dependencies.

CLINext.jsstorefront
Install
npx @usethrottle/create-store my-store

@usethrottle/ui

Production

Shared theme, presets, primitives and icons for Throttle React components.

Browser React components with a server-safe /presets entry. The theme core behind @usethrottle/auth and the storefront components; you rarely install it directly.

Reactthemingprimitives
Install
npm install @usethrottle/ui

@usethrottle/api-client

Generated

Generated TypeScript REST client for advanced endpoints that do not yet have a focused SDK.

Server-side escape hatch. Prefer checkout, cart, discounts, and subscriptions SDKs for normal storefront flows.

OpenAPITypeScriptREST
Install
npm install @usethrottle/api-client

@usethrottle/webhook-types

Production

Discriminated unions for every outbound webhook event + a Stripe-compatible signature verification helper.

Node 20+. Use from your webhook route handler to narrow event.data without casts.

TypeScriptwebhookstypes
Install
npm install @usethrottle/webhook-types

@usethrottle/scripts

Production

Loader that runs merchant and app scripts on your own storefront, each in a null-origin sandboxed iframe.

Browser only. Also available as a single script tag from jsDelivr, and as React hooks from the /react subpath.

Scriptsstorefrontconsent
Install
npm install @usethrottle/scripts

@usethrottle/extension-bridge

Production

Iframe runtime bridge for extension apps, plus webhook verification helpers for extension event receivers.

Browser iframe client for createBridge(); Node route handlers can import the webhook verifier subpath.

ExtensionsiframepostMessage
Install
npm install @usethrottle/extension-bridge

@usethrottle/cli

Setup

Command-line helper for embed configuration and developer setup tasks.

Developer workstation or CI setup tool.

CLIoriginssetup
Install
npm install -g @usethrottle/cli

@usethrottle/mcp

Setup

Model Context Protocol server: lets Claude and other MCP clients read your commerce data, debug checkouts, and check request shapes against the contract.

Local stdio process launched by an MCP client.

MCPAIdebugging
Install
npx -y @usethrottle/mcp

Package Boundary

For public integrations, use the @usethrottle/* packages above. If a package is not listed here, it is not public API.

Check published versions
npm view @usethrottle/checkout-sdk version && npm view @usethrottle/checkout-react version && npm view @usethrottle/cart version && npm view @usethrottle/discounts version && npm view @usethrottle/subscriptions version && npm view @usethrottle/extension-bridge version