Skip to main content

Prerequisites

  • Node.js: version 18 or higher
  • Package Manager: npm, pnpm, or yarn
  • TypeScript: version 5.0 or higher recommended

Install Package

Run the following command in your terminal to install the core gateway package:
npm install @betterdata/commerce-gateway

Dependencies

The core package is designed to be lightweight with minimal dependencies. However, depending on the adapters and backends you use, you may need additional packages:

For Redis Sessions

If you plan to use Redis for session management:
npm install ioredis

For Shopify Backend

If you use the built-in Shopify backend:
npm install @shopify/shopify-api

For Hono Server

If you want to use the Hono-based HTTP adapter:
npm install hono @hono/node-server

TypeScript Configuration

Ensure your tsconfig.json has esModuleInterop and skipLibCheck set to true:
tsconfig.json
{
  "compilerOptions": {
    "target": "ESNext",
    "module": "ESNext",
    "moduleResolution": "node",
    "esModuleInterop": true,
    "skipLibCheck": true,
    "strict": true
  }
}

Next Steps

Now that you’ve installed the package, follow the Quickstart to build your first conversational commerce gateway.