Skip to main content
ForgeMeshField notes ·

One gate for the whole web: Pay-per-Crawl now ships for ten stacks

A glowing toll gate at the center of a dark data highway, with a line of small robots paying at the gate while people walk a free lane, and ten glowing windows with abstract shapes fanning out behind it amid confetti

Last night Pay-per-Crawl was a WordPress plugin that started as a comment on TikTok, with two real payments behind it. This afternoon the same gate runs on WordPress, Drupal, Laravel, Next.js, Node, Cloudflare, nginx, Caddy, Traefik and Python, and it is published on npm, PyPI, Packagist and drupal.org. Every edition settled two real payments on Base mainnet before we released it. We are proud of this one, so here is exactly what shipped and what it took.

The same gate everywhere

The behaviour is identical on every stack. Humans and reverse-DNS-verified search engines read free. AI crawlers, SEO crawlers and scripts get an HTTP 402 carrying an x402 v2 header, a v1 body and an MPP challenge. They pay USDC on Base, and the page is served only after the settlement transaction hash comes back.

The owner keeps 100%, paid directly to their wallet. There is no custody, no ForgeMesh account and no API key. PayAI is the default facilitator and any facilitator URL works. Every edition carries the same 85-agent crawler catalog and serves the same discovery files: /.well-known/x402.json, llms.txt and agents.txt.

10

stacks, one behaviour

10

real $0.01 settlements on Base mainnet in one day

85

crawlers in the shared catalog

Pick your stack

WordPress: free GPL plugin from forgemesh.io/wordpress, a GitHub release. It is submitted to wordpress.org and under review, so it is not listed there yet.

Next.js middleware: npm i @forgemeshlabs/pay-per-crawl-next

Express, Fastify, Hono, Koa: npm i @forgemeshlabs/pay-per-crawl-node

Cloudflare Worker in front of any origin: npm i @forgemeshlabs/pay-per-crawl-worker. The shared engine is @forgemeshlabs/pay-per-crawl-core, and there is an nginx njs snippet too. Source: github.com/forgemeshlabs/pay-per-crawl-js.

Python (FastAPI/Starlette, Flask/WSGI, Django): pip install forgemesh-pay-per-crawl, repo pay-per-crawl-py.

Go: go get github.com/forgemeshlabs/pay-per-crawl-go. It includes a Caddy module (http.handlers.pay_per_crawl, built with xcaddy) and a Traefik plugin.

PHP: composer require forgemesh/pay-per-crawl-laravel or composer require forgemesh/pay-per-crawl-drupal, both on the shared forgemesh/pay-per-crawl-core. Drupal has a project page at drupal.org/project/pay_per_crawl.

How we know it works

Every edition passed its own test suite and a 37 to 44 check HTTP matrix. Then each code base settled two real $0.01 payments on Base mainnet through PayAI before release. That is ten real settlements in one day. A few of the transactions: WordPress v1, Python v2, Go v1, Laravel v2. All public on Basescan.

We would rather show you a transaction hash than say the word tested.

Two security bugs, found and fixed before publishing

Porting the gate turned up two real problems, and we fixed both in every edition before anything went to a registry.

A forwarded-IP spoof. A crawler could prepend a Googlebot address to X-Forwarded-For and walk through as a search engine. All editions now use the right-most hop, the one our own proxy appended.

Unanchored path exemptions. Free paths like /robots.txt were matched loosely enough that /robots.txt.html or /.well-known/../post could slip past the gate. The exemptions are now exact files, a sitemap regex, and normalised dot segments.

We are telling you because that is how we ship: attack our own gate first, then publish.

What porting taught us

Drupal: the page cache answers before normal event subscribers ever run, so the gate had to become an HTTP middleware that sits above it.

Laravel: Sanctum drops middleware groups unless they are pushed after boot.

Traefik: its plugin interpreter cannot load assembly-backed keccak, so the Go edition carries a pure-Go keccak.

Edge editions pass static assets free by default, since nobody is scraping your favicon for training data.

Pro works with every edition

Pro is $4.99 a month for up to 5 sites at proxy.forgemesh.io/wp, and it connects to any of the editions above: a hosted dashboard, a Monday digest, paywall monitoring with alerts, a crawler-intel feed of 104 agents, and a listing in the paid-sites directory with a badge. The gate itself is complete without it, and payments never pass through us.

How this differs from Cloudflare Pay Per Crawl

Cloudflare Pay Per Crawl bills a few enrolled AI companies by card, with Cloudflare as merchant of record. Ours lets any x402 or MPP agent pay the site owner's wallet directly. If you also use Cloudflare, set its AI crawler control to Allow, otherwise crawlers are blocked before they get the chance to pay.

Thank you

One TikTok comment, one night, one afternoon. Thank you to everyone who asked for it. Tell us which stack we missed.

Bill the bots on any stack

Pick your edition above or start at forgemesh.io/wordpress. Pro ($4.99/mo, up to 5 sites) is at proxy.forgemesh.io/wp.

Related reading: Your WordPress site gets 175,000 bot visits a day. Now they pay..

Filed under
  • ai-crawlers
  • x402
  • wordpress
  • opensource
From the archiveAll posts →