Coming soon. The
@1stdigital/prism-http package is being updated for the latest x402 protocol. For Node.js applications today, please use the Express SDK.Overview
The @1stdigital/prism-http package provides middleware for vanilla Node.js HTTP servers, without requiring any framework. Perfect for lightweight APIs or custom HTTP implementations.Zero Dependencies
Works with raw http/https modules
Framework-Free
No Express, Fastify, or other framework needed
Lightweight
Minimal overhead, maximum performance
Installation
- npm
- yarn
The canonical SDK config is
identifyToken (PRISM_IDENTIFY_TOKEN env var) — formerly apiKey / PRISM_API_KEY. SDKs accept the legacy names as fallback during the migration window; new code should use the canonical names.Quick Start
Configuration
Routing
URL-based Routing
Accessing Payment Info
Settlement Validation
HTTP middleware interceptsres.end() to validate settlement: