HTTP, MCP, and A2A — one protocol, three transports. From web APIs to autonomous AI agents, choose the transport that fits your use case.
Standard web APIs and services
The original t402 transport. Uses HTTP 402 status codes and custom headers to enable payment flows over standard REST APIs, webhooks, and web services.
Use cases
AI agents and LLM tool calls
Payment flows over the Model Context Protocol using JSON-RPC error responses. Enables AI agents and MCP clients to pay for tools and resources autonomously.
Use cases
Agent-to-agent service commerce
Payment coordination over the Agent-to-Agent protocol using task-based state management. Agents negotiate and settle payments within multi-agent workflows.
Use cases
import { paymentMiddleware } from "@t402/express";
import { ExactEvmServer } from "@t402/evm/exact/server";
app.use(paymentMiddleware({
"GET /api/data": {
price: "$0.01",
network: "eip155:8453",
schemes: [new ExactEvmServer({ payTo: "0x..." })],
},
}));| HTTP | MCP | A2A | |
|---|---|---|---|
| Signaling | HTTP 402 status code | JSON-RPC error code 402 | Task state: input-required |
| Data Format | Base64 headers | JSON in error.data | JSON in task metadata |
| Client Type | Web apps, mobile, CLI | AI agents, LLM clients | Autonomous agents |
| Best For | APIs, webhooks, paywalls | Tool monetization | Agent commerce |
| SDK Support | TS, Go, Python, Java | TS, Go, Python, Java | TS, Go, Python, Java |
All transports share the same payment verification and settlement logic. Choose the transport that fits your use case.