For developers selling a file to buyers who hold USDC on Base

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 startersx402 Seller Kit
Return an x402 v2 402 challengeYesYes, with Bazaar discovery metadata
Agents auto-pay through a facilitatorYes, with a facilitator configuredNo. Agents use /order and /claim instead
Human checkoutSome include a browser-wallet paywall; exchange withdrawals can’t sign itAny wallet or exchange: order → send USDC → paste hash
Buyer pays a round amount from any walletNeeds an x402 client and a facilitatorYes: send 29 (or more), then sign a free message with the paying wallet
Safe if someone copies a public tx hashNot relevant (facilitator flow)Yes: signature from the paying wallet, or a secret order code + unique amount for exchanges
One-time claimsNot relevantYes, atomic in D1, re-download up to 5×
Threat model, buyer copy, directory listNoYes
PriceFree$29 USDC

What’s in the ZIP

x402-seller-kit-v1/ ├── README.md quickstart, how a sale works, honest limits ├── docs/ │ ├── HOW-IT-WORKS.md threat model: replay, front-running, fake token… │ ├── PLAYBOOK.md free x402/agent directories tested Oct 2026 │ └── BUYER-COPY.md "how to pay with USDC on Base" page text ├── template/ │ ├── worker.js storefront, /claim, /order, x402 402, llms.txt │ ├── orders.js claim engine: wallet signatures + order codes │ ├── wallet-proof.js ecrecover + ERC-1271 smart-wallet check │ ├── secp256k1.js vendored @noble/secp256k1 (MIT) │ ├── config.js your settings (plus wrangler.toml) │ ├── schema.sql D1: orders, claims, rate │ ├── migrate-v1.0.3.sql upgrade from earlier versions │ ├── wrangler.toml.example │ ├── product.b64.js placeholder for your file │ └── scripts/ │ ├── embed-file.py embed your file │ └── smoke-test.sh 12 checks against your live store ├── LICENSE.md └── CHANGELOG.md

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”.
See the full README and file list

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

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.

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

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:

0x8ca7ae7A69312a37a11bDA85b8D13b79e9De944e

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.

2. Paste the transaction hash, then prove the payment is yours by signing a free message with the same wallet. Signing doesn’t move any money.

Can’t connect your wallet on this page? Sign by hand

Copy the message, sign it with the wallet that paid (use its “Sign message” feature), then paste the signature (0x…).

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.

Your order code fills in automatically on this device. Keep it: it’s your receipt.

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 live

For 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.