Supported Runtimes
The SDK provides runtime-specific builds optimized for each environment:Node.js
Node.js 20.15.0 and higher with full feature support
Edge Workers
Cloudflare Workers, Vercel Edge Functions, and Convex
Deno
Deno runtime with native TypeScript support
Bun
Bun runtime for high-performance JavaScript
Automatic Runtime Detection
The SDK uses the Node.js exports field to automatically select the correct build for your runtime:package.json
Runtime Differences
Standard Build (index.js / index.cjs)
Used by Node.js, Deno, and Bun:
- Full Node.js API access
User-Agentheader supportprocess.emitWarning()for deprecation warnings- Supports both ESM and CommonJS
Worker Build (index.worker.js)
Used by Cloudflare Workers, Vercel Edge, and Convex:
- Web Standards API only (no Node.js APIs)
- Limited header customization
console.warn()for warnings instead ofprocess.emitWarning()- Optimized for edge runtime constraints
Both builds use the same SubtleCrypto API for cryptographic operations, ensuring consistent webhook verification and JWT handling across all runtimes.
Module Formats
The SDK is distributed in multiple module formats:ES Modules (ESM)
ES Modules (ESM)
- Modern JavaScript module format
- Native
import/exportsyntax - Tree-shakeable for smaller bundle sizes
- Default for Node.js, Deno, Bun, and edge runtimes
CommonJS (CJS)
CommonJS (CJS)
- Traditional Node.js module format
- Uses
require()andmodule.exports - Bundles ESM-only dependencies for compatibility
- Available for Node.js and Bun
Getting Started
Choose your runtime to see specific installation and usage instructions:Node.js
Traditional server-side JavaScript
Edge Workers
Cloudflare Workers and Vercel Edge
Deno & Bun
Modern JavaScript runtimes