Skip to content

Latest commit

 

History

History
72 lines (43 loc) · 4.06 KB

File metadata and controls

72 lines (43 loc) · 4.06 KB

Server Frameworks & Middleware

Server-side integrations for accepting x402 payments. Drop into your existing stack with minimal changes.


Featured — August 2026: machi Agent behavior that compiles — an execution framework with x402 payment primitives baked in rather than bolted on. Payment as a language feature, not an afterthought.

Node.js / TypeScript

Multi-Framework

  • machi — Agent behavior that compiles. x402-native agent execution framework with payment primitives baked in. 562★
  • aixyz — Next.js-like framework for building payment-native AI agents. Bootstrap agents that pay and receive via x402 out of the box. 81★
  • x402-gateway-template — Production-ready x402 gateway template. Widely referenced starting point for new x402 server deployments. 94★
  • monapi — One-line API monetization SDK. Wraps x402 setup into a single function call. Express, Next.js, and MCP support. Per-route pricing, Base/Arbitrum/Polygon, gas-free agent payments via EIP-3009. (npm) (GitHub)

Express / Hono

  • @moltrust/x402 — Trust score middleware for x402 endpoints. One line: app.use(requireScore({ minScore: 60 })). Extracts paying wallet from X-Payment header, looks up MolTrust trust score, blocks agents below threshold with 403. Zero dependencies. (GitHub)
  • Azeth Provider — Hono middleware for gating endpoints behind x402 with payment-agreement support for recurring agent-to-agent billing. (npm)

Next.js

API Gateways

  • Zuplo x402 — API gateway with x402 paywalls. Add pay-per-request monetization to any API or MCP server. Sub-cent transaction fees on Base and Solana. (Docs)

Python

FastAPI

  • FastAPI example — Official complete FastAPI implementation with x402 payment middleware.

Rust

Axum


Ruby / Rails

  • x402-rails — Accept instant blockchain micropayments in Rails applications using x402. QuickNode Labs official Rails integration. 36★

Astro

  • astro-x402 — Astro middleware integration for the x402 Payment Protocol. Drop into any Astro project to gate routes behind USDC micropayments. 2★

Java / Spring Boot

  • x402-spring-boot-starter — Protect Java APIs with pay-per-call logic using a single Spring Boot annotation. Fills the Java framework gap in the official x402 ecosystem. 10★

EVM / Account Abstraction

  • nero-x402 — First Account Abstraction-native x402 stack on NERO Chain. Facilitator, SDK, and audited AA contracts for gasless agent payments. 47★

Cloudflare Workers

  • Cloudflare Agents SDK v0.4.0 — x402 v2 migration support: ClientEvmSigner type, auto-selection from payment requirements, dual-header support (v2 PAYMENT-SIGNATURE + v1 X-PAYMENT), lazy facilitator initialization.