Choose a package
The Node and Python embedded examples below target 1.35.1, a published release. Pinning the
version makes the setup reproducible; keep the project’s lockfile with your code.
Node.js SDK
Check your runtime
@stateset/embedded 1.35.1 requires Node.js 20.20.0+ and npm 10+.
Install
Verify the installation
Save this ascheck-engine.mjs:
Created and read customer: ada@example.com. The example uses an in-memory
database, so each run starts empty. To persist data, use a file path such as ./store.db and
follow the embedded quickstart.
Python SDK
Check your runtime
stateset-embedded 1.35.1 requires Python 3.9+. Its published wheels target CPython
3.9–3.13 on Linux, macOS and Windows, with availability varying by architecture. The Linux
wheels require a platform compatible with manylinux_2_34.
Create an environment and install
- macOS / Linux
- Windows PowerShell
--only-binary=:all: to the pip
install command. If pip reports no matching distribution, check the Python version,
architecture and operating-system compatibility before choosing a different environment.
Verify the installation
Save this ascheck_engine.py:
Created and read customer: ada@example.com. The Python embedded binding uses
synchronous methods here. Its package name is stateset-embedded, while the import is
stateset_embedded.
Hosted API integrations
For a hosted service, first choose its base URL, header and credential. A ResponseCX key is not a commerce database credential, and an embedded library does not configure a hosted service. The developer guide contains complete JavaScript, Python and curl requests to read a ResponseCX workspace. It uses standard HTTP libraries, so you can verify access before introducing an SDK.Existing REST SDK integrations
stateset-node and stateset-python are REST client packages. They are separate from
@stateset/embedded and stateset-embedded; replacing the package name alone does not migrate
an application between them.
Before copying an example into an existing integration:
- Check the installed package and version in your lockfile or package metadata.
- Check the client’s resource method and request shape against its version’s types or source.
- Confirm the API host and authentication in the API directory.
- Make one read request before implementing resource creation or retries.
customerId and items in orders.createExact;
a REST API may use different field names. Copy the contract for the interface you are calling.
Troubleshooting
Include the package version, runtime version, OS, CPU architecture and full redacted loader or
HTTP error when asking for help.
Next steps
The customer quickstart covers identity reuse, profile updates, and addresses. The integration testing guide turns commerce behavior into an executable suite you can run in CI. Continue with the inventory quickstart for explicit stock holds, or the payment and refund quickstart for local financial records and retry behavior. Both contain complete programs with assertions and expected output.Create a persisted order
Verify customer creation, decimal-string totals and persistence.
Manage stock and cancellation
Reserve stock, reject an oversized order and verify cancellation releases the reservation.
Connect an AI agent
Point an MCP host at your database and verify its first tool call.
Language bindings
Compare language surfaces and money representations.