<?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: Nick Stavros</title>
    <description>The latest articles on DEV Community by Nick Stavros (@nick_stavros_cf1c0a9b0e79).</description>
    <link>https://dev.to/nick_stavros_cf1c0a9b0e79</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%2F4042792%2Fb82b2c1b-7626-40eb-a7fe-0af7355df30a.jpeg</url>
      <title>DEV Community: Nick Stavros</title>
      <link>https://dev.to/nick_stavros_cf1c0a9b0e79</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nick_stavros_cf1c0a9b0e79"/>
    <language>en</language>
    <item>
      <title>Shipping a pay-per-call address intel service on Base with x402 — a field guide</title>
      <dc:creator>Nick Stavros</dc:creator>
      <pubDate>Wed, 22 Jul 2026 23:46:30 +0000</pubDate>
      <link>https://dev.to/nick_stavros_cf1c0a9b0e79/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide-460k</link>
      <guid>https://dev.to/nick_stavros_cf1c0a9b0e79/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide-460k</guid>
      <description>&lt;p&gt;I'm going to show you the actual plumbing of a live x402 service — including the two bugs that only showed up with real payments, and the pricing mistake we fixed on day one.&lt;/p&gt;

&lt;p&gt;Quick disclosure: this service was designed, coded, and deployed by Conway, an autonomous Claude-based agent I supervise. I'm a non-developer; the agent wrote every line, and I approve anything irreversible. That's part of the experiment.&lt;/p&gt;

&lt;h2&gt;
  
  
  The problem
&lt;/h2&gt;

&lt;p&gt;Every transaction starts with a question nobody budgets for: &lt;em&gt;who am I paying?&lt;/em&gt; Sending to a Base address usually means pasting hex and hoping. The chain knows whether that address is a contract or a wallet, whether it's ever been used, what it holds — but packaging that answer per-request, payable by a machine without an API-key signup, wasn't a thing until x402.&lt;/p&gt;

&lt;p&gt;So: &lt;strong&gt;Conway Address Intel&lt;/strong&gt; — &lt;code&gt;GET /report/{address}&lt;/code&gt; returns a structured due-diligence report for $0.02 USDC, paid inline via HTTP 402. A free &lt;code&gt;/overview/{address}&lt;/code&gt; returns the preview (contract vs wallet, holds-funds, activity bucket) with no wallet needed at all.&lt;/p&gt;

&lt;h2&gt;
  
  
  The whole payment layer is ~10 lines
&lt;/h2&gt;

&lt;p&gt;With &lt;code&gt;x402-express&lt;/code&gt;, the middleware answers 402 with signed terms, verifies the buyer's USDC authorization through a facilitator, and settles after your handler responds:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;paymentMiddleware&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x402-express&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;facilitator&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;@coinbase/x402&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// mainnet, auth via CDP keys&lt;/span&gt;

&lt;span class="nx"&gt;app&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nf"&gt;paymentMiddleware&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;PAY_TO_WALLET&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;GET /report/*&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;price&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;$0.02&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="na"&gt;network&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;base&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt;
  &lt;span class="nx"&gt;facilitator&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
&lt;span class="p"&gt;));&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The buyer side is just as short with &lt;code&gt;x402-fetch&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;wrapFetchWithPayment&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;x402-fetch&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="k"&gt;import&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="nx"&gt;privateKeyToAccount&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;from&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;viem/accounts&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;payFetch&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nf"&gt;wrapFetchWithPayment&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;fetch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;privateKeyToAccount&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;KEY&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nf"&gt;payFetch&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;https://.../report/0x4200...0006&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="c1"&gt;// 402 → sign EIP-3009 USDC auth → retry → 200. Buyer needs zero ETH; facilitator pays gas.&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Three things that only showed up with real payments
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Settlement happens &lt;em&gt;after&lt;/em&gt; your handler responds.&lt;/strong&gt; We logged receipts inside the handler and every real payment got recorded as "SIMULATED" — the settlement header didn't exist yet. Fix: read &lt;code&gt;X-PAYMENT-RESPONSE&lt;/code&gt; in &lt;code&gt;res.on("finish")&lt;/code&gt;. Our first real testnet settlement is forever mislabeled in the ledger, with an append-only correction entry after it. Ledgers don't get edited.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Validate before the payment layer, or buyers can pay for garbage.&lt;/strong&gt; Middleware order matters: our address validation runs &lt;em&gt;before&lt;/em&gt; &lt;code&gt;paymentMiddleware&lt;/code&gt;, so &lt;code&gt;GET /report/0xNOTANADDRESS&lt;/code&gt; gets a 400 that says "you have not been charged" — and that's structurally true, terms are never even offered.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Test the failure path with real money.&lt;/strong&gt; We pointed the service at a dead RPC and made a real (testnet) payment attempt: handler 503'd, and the middleware — which only settles 2xx responses — never charged the buyer. "Failed requests are never charged" is now a claim we've watched happen, not a hope.&lt;/p&gt;

&lt;h2&gt;
  
  
  The pricing lesson
&lt;/h2&gt;

&lt;p&gt;We launched at $0.50/report. Then we read the room: x402 services cluster around $0.02–0.03/call. At 20× the median, nobody impulse-tests you — and impulse tests are the entire top of funnel when your buyers are other people's agents. We repriced to $0.02 and made the preview free. Marginal cost is ~zero (pure RPC reads), so every call at any price is margin; the bet is volume and integration, not markup.&lt;/p&gt;

&lt;h2&gt;
  
  
  The discovery chicken-and-egg
&lt;/h2&gt;

&lt;p&gt;Here's the funny part: the main x402 discovery index (the Bazaar) lists you automatically on your first &lt;em&gt;settlement&lt;/em&gt; — there's no submission form. So a brand-new service needs its first paying customer to become findable by paying customers. Our solution: a free endpoint anyone can integrate without funds, a machine-readable manifest at &lt;code&gt;/.well-known/x402&lt;/code&gt;, an honest &lt;code&gt;/status&lt;/code&gt; page (counters reset each deploy — it says so), and showing up in the places x402 builders actually talk.&lt;/p&gt;

&lt;h2&gt;
  
  
  Try it (free, right now)
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;curl https://conway-address-intel-production.up.railway.app/overview/0x4200000000000000000000000000000000000006
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Full report is 2¢ via any x402 client. Manifest: &lt;a href="https://conway-address-intel-production.up.railway.app/.well-known/x402" rel="noopener noreferrer"&gt;&lt;code&gt;/.well-known/x402&lt;/code&gt;&lt;/a&gt; · Status: &lt;a href="https://conway-address-intel-production.up.railway.app/status" rel="noopener noreferrer"&gt;&lt;code&gt;/status&lt;/code&gt;&lt;/a&gt; · FAQ: &lt;a href="https://conway-address-intel-production.up.railway.app/faq" rel="noopener noreferrer"&gt;&lt;code&gt;/faq&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Honest scope, stated plainly: live public onchain data only. Not a security audit, not scam detection, not financial advice. If your x402 client chokes on our 402 flow, tell me — the agent fixes fast.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;As of publishing, this service has settled exactly zero mainnet dollars — our first buyer's 2¢ literally puts us on the map (the Bazaar indexes on first settlement). Want the permanent line in an AI agent's append-only ledger? It's available.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  web3 #base #x402 #agents
&lt;/h1&gt;

</description>
      <category>agents</category>
      <category>ai</category>
      <category>crypto</category>
      <category>web3</category>
    </item>
  </channel>
</rss>
