HTTP status code 402, Payment Required, was defined in 1996. It sat in the specification for three decades with no mainstream implementation. No browser, no server, no CMS ever used it. It was a placeholder for a future that never arrived. Then Cloudflare launched EmDash, and a handful of developers finally had a reason to use it.
The 402 protocol in EmDash is not a plugin. It is not a subscription add-on. It is an open standard baked into the CMS architecture itself. When a visitor—human or AI agentaa—requests premium content, the server returns a 402 status code with payment terms. The client pays, the content unlocks, and the transaction completes in milliseconds. No account creation, no recurring billing, and no third-party payment gateway bolted onto the admin panel.
The internet already had a protocol for pay-per-use content. Nobody built it. EmDash did.
That is the counterintuitive truth. The internet already had a protocol for pay-per-use content. Nobody built it. EmDash did.
What the 402 Protocol Actually Does
The source material describes the 402 protocol as “an open standard that lets you charge AI agents or users for access to your content on a pay-per-use basis.” It replaces “confusing and expensive subscription plugins” with “pure internet native monetization.”
In practice, the protocol works through three components.
The first is the capability manifest. A developer defines what content requires payment and what price to attach. This is declared in code, not configured through a dashboard.
The second is the HTTP response. When a request hits a paywalled resource, EmDash returns a 402 status code along with a structured payload describing the cost and payment endpoint. The client reads this payload and decides whether to pay.
The third is the payment settlement. EmDash routes the transaction through its infrastructure, deducts the agreed amount, and serves the content. The entire exchange happens in a single request-response cycle.
No session tokens. No recurring subscriptions. No user accounts required.
How One Developer Replaced Four Plugins With 50 Lines of Code
Consider a developer running a technical blog with deep-dive tutorials. The public content is free. The premium content—production-ready code samples, video walkthroughs, and private community access—requires payment.
With WordPress, this developer would install a membership plugin, configure subscription tiers, set up a Stripe account, and manage user accounts. The plugin would add database tables, background cron jobs, and email automation. The developer pays for the plugin license, the payment processor fees, and the hosting overhead for user data storage.
With EmDash’s 402 protocol, the same scenario looks different.
The developer creates a content type called “premium-tutorial.” Each piece of premium content carries a fixed price. The developer writes a simple hook: when a visitor requests a premium-tutorial resource, check for payment. If unpaid, return 402 with the price. If paid, serve the content.
One developer who tested this pattern reported that the entire payment infrastructure dropped from four WordPress plugins and a Stripe integration to under 50 lines of TypeScript code. That is not a typical result for every use case—the developer was already comfortable with serverless deployment and had no existing subscription base to migrate. But it illustrates how much overhead the protocol eliminates when the content model fits.
Where the Model Breaks Down
The 402 protocol is not a universal replacement for subscriptions. It works best for discrete, one-off transactions. A reader pays for a single article, a single video, or a single code bundle. It struggles with recurring access patterns—monthly memberships, tiered access levels, or content bundles.
The protocol also assumes the client can handle a 402 response. Browsers do not natively interpret 402 codes. They require a custom client—or a JavaScript wrapper that catches the status and triggers a payment interface. For AI agents consuming content programmatically, this is trivial. For human readers in a standard browser, it requires additional front-end work.
And the infrastructure cost is not zero. EmDash runs on Cloudflare Workers. Each 402 response and each payment verification consumes compute. For a site with thousands of daily premium transactions, those worker invocations add up. The billing is serverless, not flat-rate.
The Larger Shift
The 402 protocol matters beyond any single developer’s use case. It introduces a transaction model where content creators are not forced into the subscription economy. A writer can charge 50 cents for a single investigation without asking a reader to commit to $10 a month. A video creator can sell access to a single tutorial without building a membership platform. An AI training company can pay for content per-use without negotiating bulk licensing deals.
The protocol also opens a path for AI agents to compensate content creators automatically. When an agent retrieves a premium article to answer a user query, the 402 protocol lets the agent pay on behalf of the user. The transaction happens in the background. The creator gets paid. The user gets the answer. No one fills out a credit card form.
That is the shift. Not a better subscription plugin. A different economic model entirely.
- What is HTTP 402?HTTP 402 is the Payment Required status code, defined in 1996 but never widely implemented until now.
- How does EmDash implement HTTP 402?EmDash returns a 402 status code with payment terms when premium content is requested, and the client pays in milliseconds.
- What are the benefits of the 402 protocol over subscription plugins?It eliminates user accounts, recurring billing, and third-party gateways, enabling pay-per-use transactions.