Overview
The @1stdigital/prism-fastify package provides a Fastify plugin for payment-protecting your API routes using the x402 protocol. It leverages Fastify’s hook system for high-performance payment validation.High Performance
Fastify’s async hooks for minimal overhead
Plugin Architecture
Standard Fastify plugin pattern
Type Safe
Full TypeScript support with decorators
Installation
- npm
- yarn
- pnpm
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.