create-typescript-x402-paywall

Create x402 payment paywall middleware for Algorand and multi-chain TypeScript backends.

Updated Apr 6, 2026
One-click install
npx skills add https://github.com/Rudhrakoushik10/RootNode --skill create-typescript-x402-paywall-rudhrakoushik10
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: create-typescript-x402-paywall
Source: https://github.com/Rudhrakoushik10/RootNode/tree/main/projects/.opencode/skill/create-typescript-x402-paywall
Command: npx skills add https://github.com/Rudhrakoushik10/RootNode --skill create-typescript-x402-paywall-rudhrakoushik10

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve? Monetizing API endpoints requires building payment verification, wallet integration, and 402 response handling from scratch. This Skill guides the creation of server-side paywall middleware that serves HTML payment pages to browsers and JSON 402 responses to API clients, with automatic Algorand wallet integration. ## Core Features & Use Cases - PaywallBuilder Configuration: Build paywall providers with network handlers for AVM (algorand:), EVM (eip155:), and SVM (solana:*) chains, with priority-ordered handler registration. - Framework Middleware: Integrate payment gating with Express.js, Hono, or Next.js using paymentMiddleware, paymentProxy, or the withX402 route wrapper. - Wallet Integration: Automatically discover and connect Pera, Defly, and Lute wallets via wallet-standard, check USDC balances, and handle transaction signing. - Use Case: Protect a premium weather API endpoint with a $0.01 USDC payment on Algorand testnet, so browsers see a branded payment page while API clients receive a machine-readable 402 response. ## Quick Start Create an x402 paywall for my Express API that charges 0.01 USDC on Algorand testnet for the /api/premium-content endpoint.

Frequently Asked Questions about create-typescript-x402-paywall

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create an x402 paywall for an Express.js API?

Install @x402-avm/paywall and @x402-avm/express, build a paywall with createPaywall().withNetwork(avmPaywall), define route payment requirements, then apply paymentMiddleware(routes, server, config, paywall) before your protected route handlers.

How do I accept payments on multiple chains with one paywall?

Register multiple network handlers in priority order, such as avmPaywall for algorand:*, evmPaywall for eip155:*, and svmPaywall for solana:*. Then provide an array of payment requirements in the route's accepts field so clients can pay on any supported network.

Which Algorand wallets work with the x402 paywall page?

The generated paywall page discovers wallets via @wallet-standard/app and supports Pera Wallet, Defly Wallet, and Lute Wallet through the algorand:signTransaction feature. It handles wallet selection, USDC balance checks, signing, and automatic retry.

Does the x402 paywall work with Next.js and Hono?

Yes. Next.js supports both middleware via paymentProxy and per-route protection via withX402. Hono uses paymentMiddleware applied with app.use, and it also works in Cloudflare Workers environments.

Why is the paywall HTML not showing in my browser?

The middleware only returns HTML when the request includes an Accept: text/html header, so navigate directly in a browser rather than using programmatic fetch. Also verify the route patterns in your routes config match the request paths.

What USDC asset IDs are used on Algorand testnet and mainnet?

USDC on Algorand testnet uses ASA ID 10458941, while mainnet uses ASA ID 31566704. Set the testnet flag consistently in both PaywallConfig and the middleware configuration to match your target network.