create-typescript-x402-server
Installation
SKILL.md
Creating x402 Payment-Protected Servers
Build TypeScript servers that gate API endpoints behind Algorand (AVM) payments using Express.js or Hono middleware.
Prerequisites
Before creating a payment-protected server:
- Node.js 18+ installed
- An Algorand address to receive payments (58-character address)
- A facilitator -- either run your own or use
https://facilitator.goplausible.xyz - TypeScript project initialized with
tsconfig.json
Core Workflow: Middleware-Based Payment Gating
The server middleware intercepts requests to protected routes, checks for a valid X-PAYMENT header, and either returns 402 (pay first) or passes through to the route handler (payment verified).