<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: PageVerified</title>
    <description>The latest articles on DEV Community by PageVerified (@pageverified).</description>
    <link>https://dev.to/pageverified</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4249382%2F56f65c10-981a-4228-b140-b6e44f92aeeb.png</url>
      <title>DEV Community: PageVerified</title>
      <link>https://dev.to/pageverified</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/pageverified"/>
    <language>en</language>
    <item>
      <title>Before your AI agent pays an API, read the 402</title>
      <dc:creator>PageVerified</dc:creator>
      <pubDate>Tue, 17 Nov 2026 09:07:02 +0000</pubDate>
      <link>https://dev.to/pageverified/before-your-ai-agent-pays-an-api-read-the-402-3ldi</link>
      <guid>https://dev.to/pageverified/before-your-ai-agent-pays-an-api-read-the-402-3ldi</guid>
      <description>&lt;p&gt;More APIs now sell to AI agents per call. The agent asks, the server answers &lt;code&gt;HTTP 402 Payment Required&lt;/code&gt; with an offer, the agent pays a few cents in USDC and gets the result. That's x402. It's fast and needs no account, which also means your agent may be about to pay a server nobody has checked.&lt;/p&gt;

&lt;p&gt;The good news: a 402 offer tells you a lot before any money moves.&lt;/p&gt;

&lt;h2&gt;
  
  
  What's in the offer
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl -i -X POST https://example-api.com/paid-route
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;PAYMENT-REQUIRED&lt;/code&gt; header (base64 JSON) lists:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;payTo&lt;/strong&gt;: the wallet that gets paid. Does it match the seller's published address?&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;network and asset&lt;/strong&gt;: for example Base and USDC. An unexpected token is a red flag.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;amount&lt;/strong&gt;: the exact price in the asset's smallest unit. Check the decimals.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;resource&lt;/strong&gt;: what you're buying. It should be the route you called.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What it doesn't tell you
&lt;/h2&gt;

&lt;p&gt;Who runs the server, whether it will deliver, and whether the wallet is really theirs. For that you need checks outside the offer: is the domain live and real, does it publish the same wallet elsewhere, does it have a track record.&lt;/p&gt;

&lt;h2&gt;
  
  
  A free way to check
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://pageverified.com/check/x402" rel="noopener noreferrer"&gt;pageverified.com/check/x402&lt;/a&gt; reads an x402 offer and explains it field by field, with no key or signup. There are matching free checks for MCP servers (&lt;a href="https://pageverified.com/check/mcp" rel="noopener noreferrer"&gt;/check/mcp&lt;/a&gt;) and agent readiness (&lt;a href="https://pageverified.com/check/agent-readiness" rel="noopener noreferrer"&gt;/check/agent-readiness&lt;/a&gt;).&lt;/p&gt;

&lt;p&gt;For agents, the same checks run as paid tools with no API key; a pre-pay check is 5 cents in USDC through x402 itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  The rule we use
&lt;/h2&gt;

&lt;p&gt;Never let an agent pay an endpoint whose payTo, network or amount you haven't seen and agreed to. The 402 is right there. Read it first.&lt;/p&gt;

</description>
      <category>x402</category>
      <category>ai</category>
      <category>api</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
