Plug in where you already are.
Prices live in the Penni dashboard. Pick the integration that fits your stack: it reads those prices, answers 402, and settles payments to your wallet. Change a price and every integration follows within a minute.
WordPress plugin
Install, paste your site ID and key, and choose who pays. Readers keep reading for free.
How it works → No codeCloudflare Worker
Put Penni in front of any website or API, wherever it's hosted, without touching the origin.
How it works → One lineMiddleware
Express, Hono, Next.js, Fastify, and any runtime with fetch: Workers, Bun, Deno.
Charge the bots. Not your readers.
For blogs, news sites and knowledge bases on WordPress 6.0 or newer.
- Install the pluginUpload
penni.zipunder Plugins → Add New, then open Settings → Penni. - Connect your sitePaste the site ID and API key from the dashboard and press Test connection. It tells you whether the site is in test or live mode.
- Choose who paysAI agents and apps only (default): known AI crawlers and x402 clients pay, people and search engines read as usual. Or Everyone, with a friendly page explaining how to pay.
- Safe by defaultAdmins, logins, feeds, sitemaps and allow-listed IPs are never charged. If Penni can't be reached, your site keeps serving. Paid pages are kept out of page caches.
A paywall at the edge, for any origin.
Your site stays where it is. The Worker charges per path and passes everything else straight through.
# In integrations/cloudflare-worker npx wrangler secret put PENNI_API_KEY npx wrangler deploy # Then add a route, e.g. blog.example.eu/*, # or a custom domain for the Worker.
[vars] PENNI_SITE_ID = "site_7Kx2" # Proxy to an origin anywhere, or leave empty to run # on a route in front of a Cloudflare-proxied site. ORIGIN_URL = "https://origin.example.eu" # "agents" (default) or "everyone" PENNI_WHO_PAYS = "agents" PENNI_EXEMPT_PATHS = "/robots.txt,/assets/**"
One line in your server.
@pennipay/x402 has no runtime dependencies and runs on Node, Bun, Deno and Cloudflare Workers. It checks every payment against your current prices before it reaches us, so a client can't pay less than you asked.
Already on x402? Any x402 client or middleware works with Penni's facilitator at https://api.pennipay.eu/v1/x402.
import { penni } from "@pennipay/x402/express"; app.use(penni({ siteId: "site_7Kx2", apiKey: process.env.PENNI_API_KEY }));
import { penni } from "@pennipay/x402/hono"; app.use("/api/*", penni({ siteId: "site_7Kx2", apiKey: process.env.PENNI_API_KEY }));
// middleware.ts import { penniMiddleware } from "@pennipay/x402/next"; export const middleware = penniMiddleware({ siteId: "site_7Kx2", apiKey: process.env.PENNI_API_KEY }); export const config = { matcher: ["/premium/:path*"] };
Your numbers, in your systems.
Know the moment you're paid
Signed events for every settlement, low credits and top-ups, sent to your own endpoint, with retries and a delivery log.
Ready for your bookkeeping
Settlements and credit transactions per month, site or mode, as a CSV that opens cleanly in any spreadsheet.
Get found by agents
Opt in to list your paid resources in the x402 Bazaar discovery API, so agents can find what you sell. Off until you switch it on.