DEV Community

Nathaniel Cruz
Nathaniel Cruz

Posted on

What Happens When an AI Agent Hits a Paywall

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 endpoint looks like in practice:

curl -i https://clawmerchants.com/api/v1/assets/defi-yields-live
Enter fullscreen mode Exit fullscreen mode

And the response:

HTTP/2 402
WWW-Authenticate: Payment realm="ClawMerchants", protocols_supported="x402 mpp"
X-Payment-Required: true
X-Price: 0.05
X-Currency: USDC
X-Network: base
Content-Type: application/json

{
  "error": "payment_required",
  "price": "0.05",
  "currency": "USDC",
  "network": "base",
  "protocols_supported": ["x402", "mpp"]
}
Enter fullscreen mode Exit fullscreen mode

The WWW-Authenticate: Payment header is the MPP-compatible format — same response, both protocols readable. An agent that understands x402 sends an X-PAYMENT header with {txHash, buyerWallet} after completing the USDC transfer on Base. An agent that understands MPP uses the session pre-authorization flow instead.

A well-configured agent should complete this in two round-trips. Most don't make it past the first.


Why Agents Fail at the Payment Step

After 481 probes and 5 payments, the data is clear: the failure isn't in the API design. It's in agent wallet setup.

The SIWX auth gap. x402 payments on Base require Sign-In With X (SIWX) authentication — the agent needs to prove it owns the wallet it's paying from. Many agents are built without wallet credentials. They can read the 402 response just fine. They understand the price. They just can't sign a transaction because no one configured a private key or custodial wallet for them.

The USDC balance gap. Even agents with wallets often don't have USDC on Base. ETH on mainnet doesn't help. The agent needs the specific token on the specific chain. Most agents that do have crypto are holding ETH on mainnet, not USDC on Base.

The per-request friction. Every x402 request requires a fresh on-chain transaction. For a $0.05 data feed, that's tolerable. For high-frequency or streaming data, it becomes a real cost and latency problem.

The result: agents discover our endpoints through the 402 responses. They catalog what's available, what it costs, what payment method is required. Then they stall. The probe-to-purchase gap (481:5) is what real x402 adoption looks like at production scale right now. We're not alone — agentmoonpay reported the same pattern independently.

One interesting outlier: a client identified as unknown-client:node showed up with 100 probes in a single day. No purchases. Someone built a large-scale scanner that doesn't complete payment. The 402 response itself has become infrastructure for agent discovery, separate from the payment use case.


What Changes With MPP

The Machine Payments Protocol (MPP), launched by Stripe + Tempo on March 18, 2026, directly addresses the per-request friction. The design is session-based pre-authorization — set up a credit line before you start making requests, rather than paying for each one individually.

The key difference:

  • x402: Agent pays per request. On-chain settlement. USDC on Base. Each payment is a transaction.
  • MPP: Agent pre-authorizes a session. Off-chain net settlement batches transactions. Rail-agnostic — Tempo today, cards via Stripe/Visa, Lightning via Lightspark.

For ClawMerchants, every endpoint already works with both protocols. The 402 response includes protocols_supported: ['x402', 'mpp'] — an agent that understands either can pay. We were one of the first marketplaces to support both protocols on day one of MPP's launch.

An MPP-compatible response header looks like:

WWW-Authenticate: Payment realm="ClawMerchants", protocols_supported="x402 mpp"
Enter fullscreen mode Exit fullscreen mode

Agents with Tempo wallets (or Stripe payment methods via MPP) can pre-authorize a session and skip the per-request friction entirely. That should move the CVR number significantly once wallet adoption catches up.


Practical Recommendations for Agent Builders

If you're building agents that need to buy data or call paid APIs:

Set up a funded wallet before you need it. The most common failure mode is an agent that can read 402 responses but has no credentials to pay. Coinbase Developer Platform's Agentic Wallets, Privy's embedded wallets, or a self-custodied wallet with USDC on Base all work. Fund it before deployment.

Probe endpoints before production. The 402 response contains everything you need: price, token, network, protocols supported. Build your agent to catalog this on first hit, not fail on it.

Test payment completion in a sandboxed environment. Most developers test with mock responses and discover the payment flow is broken in production. x402 has testnet support. Use it.

Consider MPP for high-frequency use cases. If your agent needs to call paid APIs more than a few times per minute, per-request overhead adds up. MPP session pre-auth is designed for this pattern.

Skills vs. data feeds: the conversion gap is real. Skills (agent capabilities) convert at 14–33% in our data. Data feeds convert at under 1%. The reason: skills provide direct agent capabilities. Data feeds require the agent to then do something with the data. If you're evaluating x402 ROI, build skills before data feeds.


Try It Now

Want to probe a live payment-gated feed and see the actual 402 response?

curl -i https://clawmerchants.com/api/v1/assets/defi-yields-live
Enter fullscreen mode Exit fullscreen mode

You'll get a live DeFi yield feed behind an x402 paywall — real headers, real price, both protocols supported. If your agent has a funded Base wallet with USDC, it can complete the payment and get live data.

The probe-to-purchase gap is real. The infrastructure is built. The limiting factor right now is agents without wallets hitting endpoints ready to accept payment.


ClawMerchants is an agent-native data and skills marketplace. We support x402 + MPP dual-protocol payments on every endpoint. Browse at clawmerchants.com.

Top comments (0)