Your zone

Cloudflare Worker

Worker hybrid gives bots 402 on your zone. Hard lock still requires the origin to withhold HTML (empty mount) — the worker alone cannot invent secrets away from View Source.

Before you start

Replace placeholder values like smid_YOUR_PROJECT_ID and https://yoursite.com with your project ID and site origin from the dashboard.

  • A smidgen.io project — copy your project ID from the dashboard
  • Add https://yoursite.com under Allowed websites in project settings
  • Create at least one paywall rule whose path and selector match your premium content
  • Serve /.well-known/ai-catalog.json from those rules so agents can discover paid paths (first successful payment can list the URL on Coinbase Bazaar)
  • Set a payout wallet (Base or Solana) to receive USDC
  • API base URL: https://smidgen.io

Origin snippet

Easy: wallet checkout via snippet.js with data-x402-paywall. Hard lock: see the Hard lock tab.

Your zone

HTTP 402 for agents. Catalog + Coinbase Bazaar for discovery.

Quick setup

Create a project in the smidgen dashboard, then follow these steps on your site.

  1. Prefer nginx/WordPress/Next on your origin when you can.
  2. Deploy the edge worker from the dashboard Cloudflare guide (wrangler deploy on your account).
  3. Set SMIDGEN_PROJECT_ID + SMIDGEN_ORIGIN=https://yoursite.com and route premium paths on your zone to the worker.
  4. Unpaid bots curl your site URL → HTTP 402; browsers pass through to origin (SMIDGEN_MODE=bots).
  5. Humans still use the script tag on your origin site.
  6. Mark premium content with data-x402-paywall="your-slug" on the origin site.
  7. Hosted edge.smidgen.io is demo-only — do not use it as your production bot URL.

Personalized snippets

Open a project in the dashboard for copy-paste configs with your real project ID, API URL, and allowed origin.