Developer int dev launched AtlasData, a pay-per-call crypto data API that bills AI agents per request through x402 on Base and L402 over Lightning, running on one FastAPI application.
AtlasData, a pay-per-call crypto data API whose buyers are usually AI agents holding wallets, launched last week. It charges per request through two HTTP payment protocols, x402 in USDC on Base and L402 in Lightning sats, on a single FastAPI application.
Getting paid per request without accounts, API keys, or invoices meant implementing both protocols that work today. Both live on HTTP 402 Payment Required. An unpaid endpoint returns a 402 with a payment challenge instead of data.
The difference between the two rails is the proof of payment. x402 returns an EIP-3009 transferWithAuthorization that the client signs. A facilitator settles the transfer onchain, then the server returns the response. L402 pairs a macaroon with a BOLT11 invoice. After paying, the client retries with Authorization: L402 <token>:<preimage>, and the server checks that sha256(preimage) equals the payment hash. The server stores no state.
The reason to run both is audience split. x402 buyers are EVM-native agents, including CDP wallets and agents discovered through Coinbase's Bazaar. Settlement is a stablecoin transfer, which gives clean accounting, but every call is a chain transaction. L402 buyers are Lightning-native: the sats crowd and Nostr agents. There is no facilitator, finality is instant, and the credential can be reused until its caveats expire, which makes it closer to a bearer capability than a payment. Per-request stablecoin settlement and prepaid capability rest on different trust models, but both return the same 402 status.
Discovery documents are the product. Agents do not browse; they read /.well-known/x402, /openapi.json with x-payment-info hints, and /llms.txt. Half of paid traffic comes from crawlers rather than humans. The server must return a real challenge, not a marketing page. Any error string that is not a parseable 402 payload breaks machine clients. int dev verifies with curl -i from a clean shell; browsers see the tunnel's interstitial while agents see the 402.
One fee model, two prices. Each route has one USD price expressed twice: $0.001 for x402 or about 10 sats for L402. Keeping them equivalent matters because arbitrage hunters notice gaps. int dev rejects bad parameters before the paywall: a 404 must come before a 402, because agents retry a paid request forever if they pay into a 404.
The catalog covers spot prices, 24-hour tickers, mempool fees, Base gas and blocks, ERC-20 metadata, wallet balances, Dexscreener pairs, and the Fear & Greed index. A few paid research reports cost $0.50 or 200 sats. Everything is discoverable from /llms.txt and /openapi.json.
For developers building paid APIs for agents, running both rails pays off. The two audiences share little overlap, and the marginal cost of the second middleware is small. AtlasData is live at atlasdata.shares.zrok.io.
Source:Two HTTP payment rails, one API: how I charge agents per call with x402 and L402, by int dev, DEV Community, Nov 14, 2026
Comments
Please log in or register to join the discussion



![[Coin record watch] FLR and TRUMP hit record lows as nine tokens set new highs](https://mzwrodgsdjfdyvnraeya.supabase.co/storage/v1/object/public/article-media/articles/fdc21d6e6ba80a1c030d52c9474c3aabf07d7913504ebc0ae6467ae157de7b76.webp)