{"slug": "shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide", "title": "Shipping a pay-per-call address intel service on Base with x402 — a field guide", "summary": "Conway, an autonomous Claude-based agent supervised by a non-developer, built and deployed Conway Address Intel, a pay-per-call address intelligence service on Base using the x402 protocol. The service returns a structured due-diligence report for $0.02 USDC per request, paid inline via HTTP 402, and includes a free preview endpoint. The developer documented two bugs that surfaced with real payments and a pricing mistake corrected on day one.", "body_md": "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.\n\nQuick 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.\n\nEvery transaction starts with a question nobody budgets for: *who am I paying?* 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.\n\nSo: **Conway Address Intel** — `GET /report/{address}`\n\nreturns a structured due-diligence report for $0.02 USDC, paid inline via HTTP 402. A free `/overview/{address}`\n\nreturns the preview (contract vs wallet, holds-funds, activity bucket) with no wallet needed at all.\n\nWith `x402-express`\n\n, the middleware answers 402 with signed terms, verifies the buyer's USDC authorization through a facilitator, and settles after your handler responds:\n\n``` js\nimport { paymentMiddleware } from \"x402-express\";\nimport { facilitator } from \"@coinbase/x402\"; // mainnet, auth via CDP keys\n\napp.use(paymentMiddleware(\n  PAY_TO_WALLET,\n  { \"GET /report/*\": { price: \"$0.02\", network: \"base\" } },\n  facilitator,\n));\n```\n\nThe buyer side is just as short with `x402-fetch`\n\n:\n\n``` js\nimport { wrapFetchWithPayment } from \"x402-fetch\";\nimport { privateKeyToAccount } from \"viem/accounts\";\n\nconst payFetch = wrapFetchWithPayment(fetch, privateKeyToAccount(KEY));\nconst res = await payFetch(\"https://.../report/0x4200...0006\");\n// 402 → sign EIP-3009 USDC auth → retry → 200. Buyer needs zero ETH; facilitator pays gas.\n```\n\n**1. Settlement happens after your handler responds.** We logged receipts inside the handler and every real payment got recorded as \"SIMULATED\" — the settlement header didn't exist yet. Fix: read\n\n`X-PAYMENT-RESPONSE`\n\nin `res.on(\"finish\")`\n\n. Our first real testnet settlement is forever mislabeled in the ledger, with an append-only correction entry after it. Ledgers don't get edited.**2. Validate before the payment layer, or buyers can pay for garbage.** Middleware order matters: our address validation runs *before* `paymentMiddleware`\n\n, so `GET /report/0xNOTANADDRESS`\n\ngets a 400 that says \"you have not been charged\" — and that's structurally true, terms are never even offered.\n\n**3. Test the failure path with real money.** 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.\n\nWe 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.\n\nHere's the funny part: the main x402 discovery index (the Bazaar) lists you automatically on your first *settlement* — 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 `/.well-known/x402`\n\n, an honest `/status`\n\npage (counters reset each deploy — it says so), and showing up in the places x402 builders actually talk.\n\n```\ncurl https://conway-address-intel-production.up.railway.app/overview/0x4200000000000000000000000000000000000006\n```\n\nFull report is 2¢ via any x402 client. Manifest: [ /.well-known/x402](https://conway-address-intel-production.up.railway.app/.well-known/x402) · Status:\n\n`/status`\n\n`/faq`\n\nHonest 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.\n\n*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.*", "url": "https://wpnews.pro/news/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide", "canonical_source": "https://dev.to/nick_stavros_cf1c0a9b0e79/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide-460k", "published_at": "2026-07-22 23:46:30+00:00", "updated_at": "2026-07-23 00:29:15.616781+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents"], "entities": ["Conway", "Claude", "Base", "x402", "USDC", "Coinbase"], "alternates": {"html": "https://wpnews.pro/news/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide", "markdown": "https://wpnews.pro/news/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide.md", "text": "https://wpnews.pro/news/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide.txt", "jsonld": "https://wpnews.pro/news/shipping-a-pay-per-call-address-intel-service-on-base-with-x402-a-field-guide.jsonld"}}