x402 Paywall for TYPO3 v14: HTTP 402 Micropayments

The TYPO3 x402 paywall brings the open HTTP 402 micropayment protocol to TYPO3 v14, for human visitors and AI agent traffic alike. Includes per-page toggles, on-chain stablecoin payments and MCP tools.

Auf einen Blick

  • The x402 protocol turns HTTP 402 "Payment Required" into an open micropayment standard, with no subscription logic, purely through HTTP headers and on-chain micropayments.
  • A PSR-15 middleware enforces the 402 flow on configured TYPO3 pages and API routes, including AI agent HTTP traffic via gated_route_patterns, with paywall toggles and price overrides set directly in the TYPO3 page properties.
  • Frontend overlay with an EIP-1193 wallet signature flow (MetaMask and compatible) for end users; stablecoin (USDC) on Base, Polygon, and others.
  • A backend analytics dashboard, PSR-14 events, MCP tools and an optional React/Next.js companion package round out the package.

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

x402 protocol and concept of the extension.

Features in Detail

Middleware, wallet flow, AI agent gating, analytics.

Installation

Composer setup and extension configuration.

Conclusion

Context and outlook.

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.

Only for TYPO3 v14

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  

Frequently 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.

Acknowledgements

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.

Let's talk about your project

Locations

  • Mattersburg
    Johann Nepomuk Bergerstraße 7/2/14
    7210 Mattersburg, Austria
  • Vienna
    Ungargasse 64-66/3/404
    1030 Wien, Austria

Parts of this content were created with the assistance of AI.