Skip to main content

NPM Package

@commercengine/checkout

SolidJS integration for Commerce Engine Checkout.

Installation

Setup

Call initCheckout once at your app’s entry point. The SDK resolves the hosted URL from storeId + environment using store-specific subdomains:
index.tsx

Use the primitive

useCheckout() returns an object with reactive getters (powered by Solid signals) and action methods:
CartButton.tsx
Each property on the returned object is a getter backed by a Solid signal. Components only re-render when the specific values they access change.
Feature flags, login methods, drawer direction, and payment provider are managed in Checkout Studio (Config API), not as SDK init options. Use theme only for per-session overrides.

Fine-grained signals

For minimal subscriptions, use the individual signal creators:
CartBadge.tsx
Available signal creators: createCartCountSignal, createIsReadySignal.

Full example

App.tsx

SolidStart

For SolidStart, initialize in the root layout. The SDK no-ops during SSR.
root.tsx

Primitive API reference

useCheckout() returns: