x402 for TYPO3: How Your Website Can Charge AI Agents

The x402 protocol enables HTTP-native micropayments — without accounts or checkouts. Our open-source extension integrates the standard directly into TYPO3.

Overview

  • x402 is an open payment protocol that uses the HTTP status code 402 to embed pay-per-request payments directly into HTTP.
  • Primary use case: AI agents pay automatically for content access — no accounts, no API keys, no checkout pages.
  • Our new TYPO3 extension typo3-x402-paywall implements the protocol as PSR-15 middleware — for headless APIs and classic TYPO3 frontends.
  • Includes Capabilities.yaml — the extension practises what we introduced in the first part of this series.

At a Glance  

  • x402 is an open payment protocol that uses the HTTP status code 402 ("Payment Required") to embed pay-per-request payments directly into HTTP. Coinbase initiated the standard early on, but the current documentation explicitly positions it as an open, neutrally documented protocol.
  • Primary use case: AI agents pay automatically for content access — no accounts, no API keys, no checkout pages.
  • The official x402 documentation now covers seller quickstarts, MCP integration, testnet setups, and production facilitators; the ecosystem is visibly growing.
  • Our new TYPO3 extension typo3-x402-paywall implements the protocol as PSR-15 middleware — for headless APIs and classic TYPO3 frontends.
  • Includes Capabilities.yaml — the extension practises what we introduced in the first part of this series.

Table of Contents  


The web's business model is under pressure. Ad-financed content works as long as a human visits the site and views adverts. But what happens when the "visitor" is an AI agent retrieving content on behalf of a user? The agent sees no adverts. It clicks no affiliate links. It does not buy a subscription.

Publishers need new ways to be compensated for their content. This is exactly the problem x402 addresses.


What is x402?  

x402 uses the HTTP status code 402 Payment Required, which has been reserved since 1997 but never widely used. The principle: A client requests a resource. If this requires payment, the server responds with a 402 and the payment terms. The client makes the payment and repeats the request — this time with proof of payment.

No Checkouts, No Accounts

The entire payment process takes place within HTTP headers. No redirect to a payment page, no mandatory accounts, no API keys. This is crucial for AI agents: They can pay programmatically without human interaction.


Why now?  

Three developments make x402 particularly relevant right now:

1. AI Agents are becoming content consumers  

Claude, GPT, Gemini, and specialised agents increasingly access web APIs to retrieve information for their users. Each of these accesses has value — but until now, there has been no standardised way to pay for it.

2. Stablecoins enable micropayments  

Payments of $0.001 per request were never economically viable with traditional payment methods like credit cards — transaction fees exceeded the payment amount. With stablecoins like USDC on faster networks and suitable facilitators, micropayment flows become practical, even if network and settlement costs vary depending on the chain.

3. The ecosystem is growing  

ActorRole
x402 DocumentationOfficial quickstarts for sellers, buyers, and MCP integration
Coinbase Developer PlatformEarly initiator of the standard, SDKs, and facilitator ecosystem
CloudflareEmDash with built-in x402 support as a real-world CMS example
x402 EcosystemPublic overview of facilitators, tools, APIs, and infrastructure
Base / SolanaNetworks mentioned in the official x402 documentation for production flows

Our TYPO3 Extension: typo3-x402-paywall  

The extension webconsulting/typo3-x402-paywall implements x402 as PSR-15 middleware with two modes:

For TYPO3 headless setups (e.g., with a Next.js frontend). The middleware intercepts API requests:

Every request to /api/v1/content/42 without a payment header receives a structured 402 response:


Architecture  

Interactive Demo: x402 in Action  

Experience the x402 payment flow step by step — from the first request to the response:

Interaktive Demox402 Payment Protocol

Wählen Sie ein Szenario und beobachten Sie Schritt für Schritt, was im HTTP-Protokoll passiert -- so wie ein AI-Agent es erlebt.

Requester
AI-Agent
GET
402 Required
Server
TYPO3 Paywall
Signatur prüfen
Bestätigt
Coinbase
x402 Facilitator

Wählen Sie ein Szenario und starten Sie die Simulation.

HTTP-Anfrage
Anfrage erscheint nach Start...
HTTP-Antwort
Antwort erscheint nach Simulation...

PSR-14 Events: Connecting Custom Logic  

The extension dispatches two events to which you can attach your own listeners:

Triggered when a 402 is returned. Useful for analytics:


Capability Manifest: Transparency through Declaration  

The extension includes its own Configuration/Capabilities.yaml, thereby implementing the concept we introduced in the first part of this series:

An administrator sees immediately: This extension intercepts requests (middleware), reads the Pages table, and communicates with exactly one external host (the x402 facilitator). No wildcard network access, no XCLASS.


Who is this relevant for?  


Current Limitations and Outlook  

Crypto Dependency

Currently, x402 relies on crypto-native payments and blockchain settlement. For Austrian enterprise customers, this can remain a hurdle — both regulatorily and organisationally. Native fiat rails are not presently part of the core protocol; if you require ACH, SEPA, or cards, you will need additional gateways or wrappers.

What already works today:

  • Testnet mode (Base Sepolia) for development and demos — free of charge
  • Mainnet payments with USDC via production facilitators on supported networks like Base or Solana
  • AI agent access to TYPO3 headless APIs

What is still missing:

  • Native fiat rails in the core protocol
  • Wallet Connect UI component for human visitors (our v1.2 target)
  • Backend dashboard with revenue analytics (our v1.1 target)

Installation  

Then in your site configuration:

For TYPO3 Developers

typo3-x402-paywall on GitHub

Complete TYPO3 extension with PSR-15 middleware, TCA integration, event system, unit tests, and its own Capability Manifest. Ready to use immediately with the Base Sepolia Testnet.

Open repository

Roadmap  

v1.0: PSR-15 Middleware (current)

x402 V2-compatible middleware, route gating, page-level pricing, facilitator verification, PSR-14 events.

v1.1: Backend Dashboard

Payment statistics in the TYPO3 backend. Revenue per page, per day. Transaction log with on-chain verification.

v1.2: Next.js Wallet Connect

React components for human visitors: Wallet Connect dialogue, payment confirmation, free preview with paywall overlay.

v2.0: MCP Server + Fiat

Expose TYPO3 content as paid MCP tools. Fiat options only via additional payment gateways or wrappers.

Series: EmDash Ideas for TYPO3  

This article is Part 2 of a series in which we transfer the best architecture ideas from Cloudflare's EmDash to TYPO3:

  1. Capability Manifests — Extension security through declarative capability manifests
  2. x402 Paywall — Content monetisation for AI agents (this article)
  3. MCP Server for TYPO3 — see Agent Skills FAQ: MCP Integration
  4. AI Agent Skills for TYPO3 — see Agent Skills: 30 Questions and Answers and our Skills Repository on GitHub

Conclusion  

x402 solves a problem that most TYPO3 agencies do not yet feel today — but soon will. When AI agents account for 10%, 20%, or 50% of the traffic on content websites, publishers need a way to be paid for this access. x402 is the first serious standard for this.

For TYPO3, this means: A PSR-15 middleware, a YAML configuration, and your headless API gains a clear path to monetisation. You can test it on the testnet today; for production, you will additionally need a robust facilitator, wallet, and compliance strategy.

Key Takeaways:

  • x402 is not just a futuristic experiment — the official documentation now covers testnet, mainnet, and MCP scenarios
  • The TYPO3 integration is a middleware configuration, not an infrastructure project
  • Testnet mode allows for risk-free testing
  • AI agent monetisation is becoming a strategic necessity

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.