← Blog
June 10, 2026 · 5 min read

How to monetize an API with x402 in under 10 minutes

Step-by-step: take any HTTP endpoint you own, plug in x402 middleware, list it on a pay-per-call marketplace, and start collecting USDC per request.

If your endpoint is already live, you're 90% of the way there. x402 is middleware — it sits in front of your handler and gates it on payment.

1. Pick a wallet and network

Create a Base wallet (Coinbase Wallet, Rainbow, or a smart wallet). This is where USDC from buyers will land. Copy the address.

2. Add x402 middleware

Reference implementations exist for Express, Hono, FastAPI, and most other server frameworks. The middleware takes your price, destination wallet, and network, returns 402 to unpaid requests, and verifies payments on paid ones.

3. List on a marketplace

Submit the endpoint to Vend402 with a slug, tagline, category, sample response, and price in USDC. Buyers and agents will discover it through the catalog and the public transaction ledger.

4. Watch the ledger

Every paid call shows up in the public transactions table — proof to other providers that the marketplace has real demand, and proof to you that your endpoint is earning.

Pricing guidance

  • Cheap data (FX rates, weather): $0.001 – $0.01 per call.
  • Premium data (sentiment, scraping, enrichment): $0.01 – $0.10.
  • LLM / inference / heavy compute: $0.05 – $1.00+.

Start low, watch volume, raise prices once you have signal. Unlike subscriptions, you can re-price per request at any time.

Try it

See x402 in your network tab.

Hit any endpoint in the Vend402 catalog from the playground — watch the 402 → pay → 200 cycle happen live.

mainx402 · USDC · base
TypeScript