Monetising digital content without forcing users into a subscription has long been an unsolved problem on the web. The x402 protocol tackles it by reviving an almost forgotten HTTP status code: 402 "Payment Required". Rather than relying on subscription logic, the server simply returns a 402 for restricted content, and the client pays with an on-chain micropayment, no login or credit card required.
The TYPO3 x402 paywall extension brings this approach to TYPO3 v14, serving both traditional browser visitors and AI agent HTTP traffic. It is a single mechanism that works without subscription logic, turning TYPO3 into the payment layer for both audiences.
Table of Contents
Overview
Features in Detail
Installation
Conclusion
Overview
The x402 protocol is an open standard for HTTP micropayments: if a server responds with HTTP 402, it simultaneously informs the client of the expected payment — amount, currency, network, and recipient address. The client executes the on-chain transaction, attaches the payment proof as an HTTP header, and repeats the request. The server verifies the proof and delivers the content. No intermediary, no account, no password.
The TYPO3 x402 paywall extension implements this flow as a PSR-15 middleware: it watches configured page UIDs and route patterns, returns a 402 when the payment proof is missing or invalid, and lets validated requests through. The design stays deliberately close to the infrastructure: the payment logic lives in the HTTP protocol, not in the application.
AI agent traffic gets special attention. With gated_route_patterns in the site YAML, you can define API routes that HTTP clients access programmatically, with no browser or UI involved. AI coding agents and LLM workflows that consume TYPO3 content pay through exactly the same protocol as human visitors, making TYPO3 the payment layer for a whole new category of consumers.
This extension requires TYPO3 ^14.3 and PHP ^8.2. On-chain payments via public networks (Base, Polygon, Ethereum) require a working network configuration and an x402-compatible payment facilitator. Base Sepolia is available as a test network.
Features in Detail
The PSR-15 middleware is the heart of the extension. It hooks into the TYPO3 middleware stack and checks, on every request, whether the requested URL falls under a paywall configuration. If it does and the PAYMENT-SIGNATURE header lacks a valid payment proof, it responds with HTTP 402 and a machine-readable payment requirements object.
For AI agents and programmatic HTTP traffic, gated_route_patterns are available in the site YAML. These wildcard patterns (a trailing * acts as a placeholder) capture API paths and apply exactly the same 402 rules as for page UIDs, with no need for matching TYPO3 pages to exist.
On top of that, the extension ships MCP tools that expose page discovery, payment-status probing, statistics and transaction lists via the Model Context Protocol. An optional React/Next.js companion package makes integration into headless TYPO3 setups straightforward.
Installation
composer require webconsulting/typo3-x402-paywallFrequently Asked Questions
Conclusion
TYPO3 as a payment layer, with no subscription logic, no intermediaries and built on an open HTTP standard. The x402 paywall extension shows that monetising web content and AI agent traffic can rest on exactly the same technical foundation. Per-page configuration, PSR-15 middleware and MCP tools make the approach just as practical for traditional TYPO3 editorial workflows as for agent-based systems.
The extension builds on the x402 protocol and the PSR-15 middleware architecture of TYPO3 v14. Our thanks go to the TYPO3 core team and the community. The extension is licensed under the GPL.