NanoTrans Agent Paywall is an agent-native paywall plugin that enables AI agents to automatically discover and purchase WordPress content using the x402 payment protocol with USDC stablecoin on the Base Network (Ethereum L2).
Key Features:
- Dual Access - Humans pay via browser wallet (MetaMask); AI agents pay automatically via x402 protocol
- Gasless Payments - Buyers unlock content with a signature only and sellers receive payouts automatically — neither side needs ETH for gas
- x402 Protocol - Industry-standard HTTP 402 payment flow with EIP-712 signatures
- USDC Payments - Stablecoin payments on Base Network (low gas fees, fast settlement)
- Agent Discovery -
/.well-known/x402 endpoint for automatic content discovery
- Gutenberg Block - Visual paywall block editor with price configuration
- Batch Payments - Purchase up to 20 articles in a single transaction
- Admin Dashboard - Revenue tracking, anomaly detection, emergency controls
- Real-time Notifications - SSE-based payment alerts
- Permanent Access - One-time payment grants permanent access via signed wallet cookie
How It Works:
- Publisher sets content prices using the Gutenberg paywall block
- AI agent requests content and receives HTTP 402 with payment requirements
- Agent signs USDC payment via EIP-712
- x402 Facilitator verifies payment on-chain
- Content is delivered as structured JSON
For Content Publishers:
- Set per-article prices in USDC
- Dynamic pricing (agent vs human, time-based)
- Revenue dashboard with real-time analytics
- Automatic fund distribution via Splitter contracts
For AI Agent Developers:
- Standard x402 (HTTP 402) payment flow — works with any x402-capable agent or SDK
- Machine-readable site discovery at /.well-known/x402
- Structured JSON API responses (articles, categories, search)
Requirements:
- PHP 8.1 or higher with GMP extension
- WordPress 6.9 or higher
- Base Network wallet (MetaMask or compatible)
- USDC tokens on Base Network
Step 1: Install and Activate
Upload the
nanotrans-x402 folder to
/wp-content/plugins/, or install directly from the WordPress plugin directory. Activate the plugin through the 'Plugins' menu.
On activation, the plugin automatically connects to the Facilitator Proxy service. You will see a success notice: "Successfully connected to Facilitator Proxy."
Step 2: Configure Your Wallet
Go to Settings > NanoTrans and enter your Base Network wallet address (the address that will receive USDC payments). Configure default content prices and other options as needed.
Step 3: Create Paywalled Content
Add the NanoTrans Paywall block to any post or page using the Gutenberg editor. Set the price in USDC and publish.
That's it! No wp-config.php editing required. The plugin handles Facilitator authentication automatically.
Testing:
To test with the Base Sepolia testnet, change the network to "base-sepolia" in Settings > NanoTrans and use testnet USDC from a faucet.
Advanced Configuration (optional):
For custom Facilitator Proxy deployments, you can override the default by adding constants to
wp-config.php:
define( 'NANOTRANS_FACILITATOR_URL', 'https://your-worker.workers.dev' );
define( 'NANOTRANS_PROXY_AUTH_SECRET', 'your-manual-bearer-token' );
0.3.1
- Fix: buyers who take longer than 30 seconds to approve the signing prompt no longer hit an opaque payment failure — the expired (charge-free) signature is detected and a fresh one is requested automatically, with a clear message. The signing button now shows the 30-second window.
0.3.0
Bundle payments go gasless.
- New: category bundles can now be purchased with a single wallet signature — the Facilitator settles the payment on-chain and pays the gas, so bundle buyers need no ETH. The classic wallet-transfer flow remains as an automatic fallback.
- Fix: the bundle purchase card now renders on block themes (e.g. Twenty Twenty-Four) whose category archives show excerpts — it was previously unreachable there — and renders exactly once per page on classic themes.
- Fix: bundle prices are displayed at USDC precision (micro-prices such as 0.0054 no longer round up to 0.01).
- Fix: buyers who already unlocked every article in a category are no longer offered the bundle again.
0.2.0
Gasless payments, hardened security, and site-agnostic categories.
Gasless payments (new):
- Buyers no longer need ETH: a post can be unlocked by signing a USDC payment authorization in the wallet — the Facilitator submits it on-chain and pays the gas. The classic wallet-transfer flow remains as an automatic fallback when gasless payment is unavailable.
- Sellers no longer need ETH: earned funds are distributed automatically (seller / platform split) by the Facilitator service. Sites that explicitly set NANOTRANS_RELEASE_KEY keep signing releases themselves.
- New settings: an "Automatic Payout Distribution" toggle and a "Payout Threshold (USDC)" field (default 1 USDC; 0 = distribute after every payment; smaller balances are swept hourly).
- Behavior change: with a NANOTRANS_RELEASE_KEY configured, distribution now waits for the payout threshold (set it to 0 to restore release-on-every-payment).
Security:
- Paywalled content is no longer exposed through the core WordPress REST API (wp-json/wp/v2/posts), RSS/Atom feeds, or auto-excerpts on archive/home/search pages.
- Human payment verification now requires a wallet signature bound to the specific post and transaction, so an observed on-chain payment cannot be replayed by a third party.
- Transaction hashes are single-use via an atomic ledger — one on-chain payment unlocks exactly one post, including under concurrent requests.
- Bundle payment verification now checks the sender and the USDC contract and requires a wallet-ownership signature, closing a free unlock via crafted tokens; bundle buyers now get a persistent access token.
- The emergency kill switch now halts human, gasless, and bundle payments too, and its admin toggle is processed before the page renders and is idempotent.
- Facilitator proxy hardening: constant-time auth-secret comparison, fail-closed rate limits on gas-spending endpoints, wallet-to-site Splitter binding, and registration URL validation.
Improvements and fixes:
- Categories are now site-agnostic: the plugin uses your site's own WordPress categories instead of a fixed taxonomy, and the set can be pinned with the
nanotrans_allowed_categories filter. Agents discover the live category set via /categories and /.well-known/x402.
- New: configure the paywall from a document-sidebar panel — add a paywall and set price, preview length, and category without hunting for the block.
- A failed payment verification now offers a no-charge retry instead of risking a second charge, and buyers can restore access on a new device with "Already paid? Restore access".
- The batch price lock now actually applies (a locked quote is honored after a price change), and gross overpayments are rejected before on-chain settlement.
- Re-registering with the Facilitator Proxy no longer deletes the working API key on failure.
- Correct private-key prefix handling in auto-release (previously corrupted ~1 in 16 keys), malformed prices are rejected, and oversized payment headers are rejected instead of truncated.
- The admin real-time dashboard no longer replays days of stored events as new notifications on every page load.
- The settings page now shows validation errors and save confirmations.
Compatibility:
- Tested up to WordPress 7.0 (block API v3, PHP 8.1+).
0.1.0
- Initial release
- x402 payment protocol support (v1 and v2) with USDC on Base Network
- Dual access: human (browser wallet) and agent (x402 auto-payment)
- Permanent human access via HMAC-signed wallet cookie after one-time payment
- Gutenberg paywall block with visual editor
- Agent discovery via /.well-known/x402 endpoint
- JSON API for structured content delivery to AI agents
- Batch payments (2-20 articles per transaction)
- Admin dashboard with revenue tracking and anomaly detection
- SSE real-time payment notifications
- Splitter contract integration for automatic fund distribution
- Circuit breaker for Facilitator outage resilience
- Cloudflare Worker proxy for CDP Facilitator authentication
- Automatic Facilitator Proxy registration on activation (no manual config needed)