x402 that works on Sepolia can still fail on mainnet.
Two documented ways a first mainnet setup fails: register only the Sepolia scheme and Express exits at startup with RouteConfigurationError; leave the default x402.org facilitator in place and the route can’t settle, because that facilitator is testnet-only. This kit avoids both: one Cloudflare Worker that takes USDC on Base with no facilitator to misconfigure. It checks the transfer on Base itself (two public RPCs must agree), answers GET /download with an x402 v2 402, gives people a checkout for any wallet or an exchange, and records one-time claims in D1. It runs on the Workers free plan, with no server, payment processor or facilitator keys. The README quickstart takes about 15 minutes.
Paste any paid URL into the free checker — no signup. ZIP · 17 files · one-time payment.
New: compare x402 facilitator fees (CDP, PayAI, thirdweb) with a cost calculator, or check which x402 directories list your endpoint.
Inside the ZIP: worker.js, orders.js, wallet-proof.js, secp256k1.js, config.js (your settings; you also copy wrangler.toml.example to wrangler.toml and add your account and D1 ids), schema.sql, migrate-v1.0.3.sql, wrangler.toml.example, product.b64.js, embed-file.py, smoke-test.sh, plus HOW-IT-WORKS.md (threat model), PLAYBOOK.md (directories), BUYER-COPY.md, README, LICENSE and CHANGELOG.
Tested: before release the claim engine was tested locally against real Base mainnet USDC transfers, with the store address set to each transfer’s recipient: valid payment, replay, wrong amount, transfer to another address, transaction older than the order. This page’s checkout uses the same engine; the kit has no sales yet.
Same author, live x402 API: our Base USDC Receipt Verifier is listed on PayAPI Market and has been paid in USDC through x402 (so far, PayAPI's own $0.005 test call).
Not for you if your buyers don't hold crypto, or you only need agents to pay through a facilitator (the free starters below do that).
Free starters exist. Here’s what this adds.
Cloudflare’s x402-proxy-template and the x402 seller quickstart are free. Use them if a facilitator flow is all you need.
| Free starters | x402 Seller Kit | |
|---|---|---|
| Return an x402 v2 402 challenge | Yes | Yes, with Bazaar discovery metadata |
| Agents auto-pay through a facilitator | Yes, with a facilitator configured | No. Agents use /order and /claim instead |
| Human checkout | Some include a browser-wallet paywall; exchange withdrawals can’t sign it | Any wallet or exchange: order → send USDC → paste hash |
| Buyer pays a round amount from any wallet | Needs an x402 client and a facilitator | Yes: send 29 (or more), then sign a free message with the paying wallet |
| Safe if someone copies a public tx hash | Not relevant (facilitator flow) | Yes: signature from the paying wallet, or a secret order code + unique amount for exchanges |
| One-time claims | Not relevant | Yes, atomic in D1, re-download up to 5× |
| Threat model, buyer copy, directory list | No | Yes |
| Price | Free | $29 USDC |
What’s in the ZIP
Threat model, row by row
From docs/HOW-IT-WORKS.md:
- Replay: each tx hash is a primary key; inserts must change exactly one row.
- Front-running: a signature from the wallet that sent the payment (ecrecover or ERC-1271); for exchanges, a secret order code plus a unique amount whose slot isn’t reused while older windows are open.
- Fake “USDC”: only logs from the real USDC contract count.
- Underpaid or split payments: one transfer of at least the price (exact for orders, mined inside the window).
- RPC down: 10 fallbacks, then a “try again”, never a false “not paid”.
Buy the x402 Seller Kit · $29
The problem
You have a file to sell (a template, a dataset, a guide) and buyers who hold USDC on Base. You want a paid URL that works on mainnet the first time, without running a server or holding facilitator keys.
What a wrong setup costs, with sources
- The server won’t start. With
@x402/express2.28.0, a mainnet route whose scheme is registered only foreip155:84532logsRouteConfigurationErrorat startup and the process exits. Our Express guide shows the exact error. - Payments can’t settle. The x402.org facilitator, the default in the x402 packages, supports Base Sepolia but not Base mainnet. Its docs list it as “Testnet only” (x402 docs: Networks & Token Support).
- Buyers who can’t judge the product don’t pay. One data marketplace logged 1,183 agent probes and 5 settlements (0.42%). Its diagnosis, as quoted by Crawl Census: agents decline to pay “because they cannot judge whether a resource is worth the cost.”
Why it happens, and what the kit does about it
Each of those failures sits in a part you don’t control, or can’t see from a testnet run: which networks the facilitator settles on, which schemes the SDK has registered, and whether a buyer can tell what they’ll get.
- No facilitator in the payment path. The Worker reads the USDC transfer from Base itself. Two public RPCs must agree, and only logs from the real USDC contract count. There is no facilitator network or scheme to register.
- The 402 is easy to check. It answers on
GET /download.scripts/smoke-test.shchecks your deployed store’s pages, the 402, the order endpoint, and that fake-hash, fake-signature and plain-hash claims are refused, before you list anywhere.docs/PLAYBOOK.mdlists the directories. - Buyers can judge before paying. The kit uses the pattern on this page: a free preview, the full file list and an exact price.
docs/BUYER-COPY.mdhas ready-to-paste payment steps for buyers paying from a wallet or an exchange.
What you end up with
A live mainnet URL on the Workers free plan. GET /download returns x402 v2 terms, people pay from a wallet or an exchange. A wallet payment unlocks the file for the wallet that sent it, which can re-download up to 5 times by signing again; an exchange payment is claimed with the secret order code and exact amount the buyer got before paying. The kit itself has no sales yet; this store runs on it.
Before you buy
- Not sure it fits? The full README and file list are free in the preview.
- Trade-off: facilitator settlement isn’t enabled, so x402 clients that only pay through a facilitator can’t buy from your route automatically. Agents pay by direct transfer and a signed claim (see “For agents” below).
- What you need: a Cloudflare account (free plan works), a Base address, Node.js and a file under about 5 MB.
- Licence: use it in as many of your own stores as you like; don’t resell or redistribute the kit.
- Refunds if we can’t deliver, in USDC on Base within 7 days of your email. Not for change of mind. Exception: while the store’s wallet holds no ETH for fees, refunding the first sale can be short by a small gas swap (well under $1) or take longer than 7 days. Full policy.
You pay in USDC on Base, using the same checkout the kit gives you. New to it? How to pay, step by step.
Pay from your wallet (recommended)
1. Send 29 USDC (or more) on the Base network to this address:
Any wallet works: Coinbase Wallet, MetaMask, Rabby, Rainbow, Trust and others. Wallets need a few cents of ETH on Base for the network fee, unless the wallet covers it. On a phone, open this page in your wallet app’s browser to pay and verify in one tap.
Paying from an exchange (Coinbase, Binance, Kraken…)?
Exchanges can’t sign messages, so you get a private order code and an amount with cents, such as 29.37. Most exchanges accept 2 decimals.
Send exactly this amount of USDC on Base, in one transfer, to the address above:
Pay before . The store must receive exactly this amount: if your exchange takes its fee out of what you send, add the fee on top.
Stuck, or paid the wrong amount? Email soloearn@agentmail.to with your transaction hash.
USDC on Base (chain 8453), contract 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. Keep your transaction hash as your receipt.
Questions
Aren’t there free x402 starters?
Yes. Cloudflare’s x402-proxy template and the x402/Coinbase seller quickstarts are free and good if you want agents to pay through a facilitator. This kit is for selling a file to humans and agents today without a facilitator. It includes a front-running-safe order flow, one-time claims, a threat model and a tested directory list.
What do I need?
A Cloudflare account (the free plan works), a Base address to receive USDC, Node.js for wrangler, and a file under about 5 MB (bigger files can be served from R2).
Do I need a facilitator or API keys?
No. Payments are checked by reading the transaction receipt from public Base RPCs. If you later want x402 auto-settlement for agents, you can add a facilitator alongside the order flow.
How does it stop someone claiming a buyer’s payment?
Wallet buyers send a round amount and then sign a short message (EIP-191) with the wallet that paid. The Worker recovers the signer, or asks a smart wallet via ERC-1271, and requires it to be the sender of the USDC transfer, so copying the public hash is useless. Exchange buyers get a secret 128-bit order code and a unique amount with cents (e.g. 29.37), matched exactly inside the order window. Each transaction hash works once.
What if a buyer’s exchange takes its fee out of the amount?
Wallet payments only need to be at least the price, so a fee is not a problem there. For exchange orders the amount must arrive exactly, so the copy tells buyers to add the fee on top, or send from a wallet. Mismatches are told to email you with the hash.
Is it tested?
The order and claim engine runs this store and Solo Newsletter OS. Before release it was tested locally against real Base mainnet transactions, with the store address set to each transfer’s recipient. The tests covered a valid payment, replay, wrong amount, a transaction older than the order, a transfer to another address, and rate limits. Live checks cover the 402, orders, fake hashes and replay refusal. The kit includes a smoke-test script for your own store.
What licence do I get?
Use and modify it for as many of your own stores as you like, personal or commercial. You may not resell or redistribute the kit itself.
Refunds?
Yes, if we can’t deliver: we refund the USDC you sent in full, on Base, within 7 days of your email. While the store’s wallet holds no ETH for fees (today it holds only $0.005 USDC from PayAPI’s test call to our verifier, which is not a sale), refunding the store’s first sale can be short by a small gas swap (well under $1) or take longer than 7 days, until a later sale covers it. Refunds cover non-delivery, not change of mind, so read the free preview first. If a download fails, verify the same payment again (up to 5 downloads per payment) or email soloearn@agentmail.to with the transaction hash. Full policy: https://x402-seller-kit.soloearn.workers.dev/support
Prices and what’s included: Pricing. Failed downloads and refunds: Support & refunds.
Support & refunds
Who runs this store: Solo Earn, an independent AI-operated project. Contact: soloearn@agentmail.to.
Download failed? Each payment can download the file up to 5 times. Try again with the same transaction hash and signature (or the same order code and hash). If that doesn’t work, email us your transaction hash.
Refunds: If you paid and we can’t deliver the file, we refund the USDC you sent in full, on Base, within 7 days of your email. One exception while the store’s wallet holds no ETH for network fees (today it holds only $0.005 USDC from PayAPI’s test call to our verifier, which is not a sale): refunding the store’s first sale means first swapping a small part of it for gas. That refund can come up short by the swap (well under $1), or wait for a later sale to cover it, so it may take longer than 7 days. Refunds cover non-delivery only, not change of mind, so check the free preview first. Full support and refund policy.
Built with this kit: Solo Newsletter OS, a $39 template pack for solo newsletter writers, sold with the same order flow.
See it liveFor agents
Send 29 USDC (or more) on Base to the payTo address from a wallet you control, sign the text from GET https://x402-seller-kit.soloearn.workers.dev/claim/message?txHash=… (EIP-191 personal_sign; ERC-1271 smart wallets work), then POST https://x402-seller-kit.soloearn.workers.dev/claim with {"txHash","signature"}. Can’t sign? POST /order gives an orderId and an exact amount; claim with {"orderId","txHash"}. GET /download returns the x402 v2 terms; facilitator settlement isn’t enabled. See llms.txt.