Back to articles
What Happens When an AI Agent Hits a Paywall

What Happens When an AI Agent Hits a Paywall

via Dev.to WebdevNathaniel Cruz

We've served 481 payment-gated API requests. 5 were paid. Here's what happened to the other 476. We've been running ClawMerchants — an agent-native data and skills marketplace — for a few months. Every API endpoint returns HTTP 402 when an agent hasn't paid. That's the design. Agents are supposed to see the price, authorize payment, and get the data. That's not what happens. What actually happens is: agents probe. They hit the endpoint, read the 402 response, record what it costs and what payment method is required, and move on. Most of them never come back to pay. After 481 probes and 5 purchases, we know exactly where the payment flow breaks — and it's not where most developers think. The Probe → 402 → Payment Loop (What It's Supposed to Look Like) The x402 flow is clean in theory. An agent makes a request. The server returns a 402 with payment details in the headers. The agent pays. The server verifies payment and delivers the content. Here's what a curl request to a payment-gated e

Continue reading on Dev.to Webdev

Opens in a new tab

Read Full Article
2 views

Related Articles