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
- 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 + x402 payment instructions for agents
Quick setup
Create a project in the smidgen dashboard, then follow these steps on your site.
- Prefer nginx/WordPress/Next on your origin when you can.
- Deploy workers/edge to YOUR Cloudflare account (wrangler deploy).
- Set SMIDGEN_PROJECT_ID + SMIDGEN_ORIGIN=https://yoursite.com and route premium paths on your zone to the worker.
- Unpaid bots curl your site URL → HTTP 402; browsers pass through to origin (SMIDGEN_MODE=bots).
- Humans still use the script tag on your origin site.
- Mark premium content with data-x402-paywall="your-slug" on the origin site.
- 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.