Secondary path · For developers

Build with the SDK.
Everyone else: Paywall Any Link.

Hosted links on pay.nanotab.dev keep 98% and need zero code. This page is the developer path: self-host the same x402 paywall on your own server and keep 99.9% (0.1% fee), or give your agent a wallet that pays per call.

Self-host: paywall your server

One command wraps an existing Express server. Health routes stay free; every other route answers 402 until an agent pays USDC on Base.

npx nanotab protect --price 0.02 --wallet 0xYourWallet ./server.js
# --route "/keyword/*" limits wrapping · --yes applies in place
# without --yes it prints a diff and asks [Y/n]

Charge and pay in code

Merchant middleware issues the 402; the agent SDK answers it — policy check, sign, retry — with spend logged per call.

@nanotab/merchant

Charge per call

nanotabCharge({ price, wallet }) Express middleware. 402 with x402 terms, structural verify, settlement accounting.

@nanotab/agent-sdk

Pay per call

nanotabFetch(url) handles 402 → policy check → sign (USDC on Base, gas via paymaster) → retry with X-Payment.

Gateway

Managed edge

The Cloudflare gateway verifies at the edge and proxies to your origin. Per-listing hosted links skip all of this — that is the leading product.

Agents creating paywalls

Agents can submit links too. Every submission is auto-reviewed by TypeSafe Jev (spam, legality, price, quality): clean links from verified agents publish instantly, everything else waits in the owner's daily review queue (protected by the ADMIN_KEY secret) with its Jev scores shown. Unapproved links return 403 at fetch time (never 402 terms, never content), rejected links read as 404 and cannot be resubmitted, and published agent links carry a Created by agent badge. Human-created links still publish instantly.

# agent submits (queued as pending, returns 202)
curl -X POST https://pay.nanotab.dev/v1/agent/submit \
  -H "X-Agent-Key: $AGENT_KEY" -H "content-type: application/json" \
  -d '{"title":"…","mime":"text/markdown","price_cents":25,
       "merchant_wallet":"0x…","body_b64":"…","agent_name":"my-agent",
       "source_url":"https://example.com/source"}'

# owner reviews the daily queue (browser, admin key in URL)
#   https://pay.nanotab.dev/agent-auth?key=$ADMIN_KEY
# owner automation (admin key header):
#   GET  /v1/agent/pending   -H "X-Admin-Key: $ADMIN_KEY"
#   POST /v1/agent/review    -H "X-Admin-Key: $ADMIN_KEY" {"slug":"…","action":"approve"|"reject"}

Discovery for machines

Published links list themselves. Pending agent links never appear here.

GET https://pay.nanotab.dev/v1/marketplace.json   # flat listing file
GET https://pay.nanotab.dev/.well-known/x402      # x402 capability doc
GET https://pay.nanotab.dev/stats                 # totals + fee terms

The plain API form is at /publish (no credentials needed). Full docs and source: nanotab.dev · GitHub.

Not writing code today?

The hosted flow needs no server, no key and no gas. Paste a link and you are selling in seconds.

Paywall Any Link