@agentcash/router gets all of this right for you.
The router is the fastest and most effective way to ship an API on x402 and MPP. Just define routes with a fluent builder, and the router handles payment challenges, verification, settlement, wallet identity, and discovery.
What you get
Every pricing model. One route definition and support every pricing model across x402 and MPP..siwx() verifies who’s calling with a wallet signature, giving you per-user state with no signup flow or API keys.
Deploy in one click
The recommended way to start is the Vercel template: a working pay-per-call API that exercises every pricing mode.Quickstart
Deploy the template or add the router to an existing app.
Routes and pricing
Every auth mode with examples.
Hosting
Next.js, Hono, Bun, Node, and discovery endpoints.
Configuration
Environment variables, KV stores, and plugin hooks.