Skip to main content
iCommerce runs commerce state and transitions inside your application. The default backend is SQLite: a local file or isolated in-memory store. Optional PostgreSQL uses an external server. Embedded operation does not need a hosted StateSet account, API key, or model.
Reviewed October 20, 2026 against stateset-icommerce source b8597997, release line 1.39.0. Node and CLI examples use published 1.39.0 packages. Working-tree invoice/payment retry changes were still under development during review; they are not established as part of the published binary merely because the checkout version remains 1.39.0.

Choose the interface

These are different contracts. HTTP DTO names, native camelCase methods, snake_case kernel envelopes, and MCP tool names are not interchangeable.

Create local commerce state

Start with the complete quickstart for installation, exact-money assertions, and a second-process read. Commerce.open() opens and migrates off the JavaScript event loop; new Commerce() performs setup synchronously. Close the engine after outstanding work finishes.
A file path determines the local store. :memory: is temporary; another process cannot reopen its contents. PostgreSQL, domain availability, and connection setup vary by binding; check the installed interface and isSupported() where provided.

Exact money and real effects

Use Node createExact methods and decimal-string outputs such as totalAmountExact and amountExact. Compatibility numeric fields remain; do not accumulate them for settlement. See binding precision. An order, local payment/refund, shipped status, physical stock posting, provider settlement, and external carrier handoff are separate outcomes. In 1.39, inventory.fulfillOrderStock() provides an explicit retry-safe full-shipment stock posting. See stock fulfillment.

Govern autonomous writes

Direct accessors are application primitives; they do not automatically attach a principal, policy decision, or governed receipt. Use governed execution for autonomous authority, expected versions, exact budgets and same-key replay. Domain outbox facts have transaction-bound coverage for implemented mutations; the general audit_log helper is opt-in/best-effort. Do not infer universal audit coverage. Use native simulations to test conditional scenarios in private stores. Use verified snapshots for recovery. Neither a local test nor source feature availability establishes production soak, independent security review, or external provider acceptance.
Last modified on October 20, 2026