Toll

WordPress plugin

Toll Gate is the WordPress plugin. The slug is toll-gate. The licence is GPL-2.0-or-later.

Toll checks writes, not page views. Leave public pages open so people and answer engines can read you. Turn Toll on for comments, forms, logins, and APIs.

Download

The zip is built from this project. The download page has the file and the sha256 file beside it.

In WordPress, upload the zip from Plugins, then open Settings → Toll.

What it protects

Comments and login are on by default. Registration, lost password, WooCommerce checkout, and Contact Form 7 are options on that screen. The checkout help is: Covers the classic checkout. The newer block checkout isn't covered yet.

A form in a theme can use data-toll="write". The attribute is always on: add it to protect that form. Check the post with toll_gate_verify_request('write') before handling it. The first value is true when the pass is good.

Visitors get an invisible check. Forms that skip it are rejected. The visible check, a "Verify before sending" button, is off by default.

Routes

The plugin is the issuer. The same API as the server page is under /wp-json/toll/v1/: challenge, redeem, status, health, and siteverify. Page views stay free. Nothing in the plugin can gate a page view.

GET /.well-known/toll.json and GET /.well-known/agents.json are served with no check.

The plugin takes no payments itself. No real money moves in the WordPress plugin's test mode. The background check runs instead. A payment server is optional and, when used for tests, local.

The hosted demo at lessspam.dev charges real money: a write is 10,000 msat, paid with Cashu through the Minibits mint or with a BOLT11 mint quote (L402_ENABLED is 1).