EmDash CMS Early access

A paywall block for EmDash, paid in USDC.

Put a whole entry, or just part of one, behind a USDC payment. Authors add one block and set a price. Readers pay with a browser wallet, AI agents pay over x402, and the money settles to your wallet on Base or Solana.

The demo runs on test networks (Base Sepolia, Solana Devnet) with test USDC. No real money moves.

What it does

Paywall a whole entry, or just part of it

A native EmDash plugin plus an Astro integration, built for publishers.

A Paywall block in the editor

Authors insert a Paywall block and type a price in USDC for that entry. Text above it is the free teaser; everything below is paid. Put it first to paywall the whole entry.

Paid sections mid-article

An optional End paywall block makes the content after it free again, so you can charge for one section and keep the conclusion open.

Removed on the server

Paid blocks are removed before the page renders. They are never hidden with CSS or JavaScript, so view-source and reader mode show only the teaser.

Readers pay with a browser wallet

EVM wallets via EIP-6963 (MetaMask, Coinbase Wallet and others) and Solana wallets via Wallet Standard (Phantom and others). Readers only sign; it is gasless for them.

AI agents pay over x402 v2

Agents request the page, get a 402 with a PAYMENT-REQUIRED header, and retry with PAYMENT-SIGNATURE. No account and no cookie needed.

Unlocks only after settlement

Access is granted only after the facilitator confirms the payment settled. Spent payments are recorded in a ledger and rejected if replayed.

Search, content API and MCP filtered

For anyone who cannot edit the entry, paid text is also removed from EmDash's own search, content API and MCP responses.

AI crawler policy

Choose what happens when a known AI crawler requests a paywalled entry: block it, charge it, or treat it like a reader.

A settings dashboard in the EmDash admin

Payout wallet (changed only in two confirmed steps), payment service, appearance, access, payments, a health and leak audit, and an audit log.

See a paywalled post on the demo →

For authors

How it works for authors

No code. Once the site owner has set a payout wallet, pricing a post happens in the editor.

  1. Write the post as usual

    Open an entry in the EmDash editor. Place the cursor where the free part should end.

  2. Insert the Paywall block

    Pick Paywall from the Monetization group of the block menu and type a price in USDC, for example 0.25. Leave it empty to use the site's default price.

  3. Optionally end the paid section

    Insert End paywall below the paid part if the rest of the entry should be free again.

  4. Publish

    Readers see the teaser, a box with the price and an Unlock button, and any free text after End paywall. Once they pay, they see everything in order.

Free introduction ...
[ Paywall  0.25 USDC ]
The paid section ...
[ End paywall ]          (optional)
Free conclusion ...
How an entry with a paid middle section is laid out. Readers see the introduction, the paywall box, then the conclusion. Prices are USDC decimals such as 0.25, at most 6 decimal places.

Payments

How readers and agents pay

Same page URL, same price, two ways to pay. Access unlocks only after the facilitator confirms settlement.

Readers: a browser wallet

  1. The locked page shows the teaser and an Unlock button with the price.
  2. The reader picks a network and a wallet: MetaMask, Coinbase Wallet and other EVM wallets (EIP-6963), or Phantom and other Solana wallets (Wallet Standard). On mobile, the box offers links to open the page in a wallet app.
  3. They sign a USDC payment. Signing is all they do: no gas, no account.
  4. The server checks the payment against the price it published, settles it, and the page reloads unlocked for a set period (7 days by default).

AI agents: standard x402 v2

  1. The agent requests the page and gets 402 with a PAYMENT-REQUIRED header listing what to pay.
  2. It signs a USDC payment and retries the same request with a PAYMENT-SIGNATURE header.
  3. Once the payment settles, it gets the page with a PAYMENT-RESPONSE header. Each request is paid; a re-sent payment is rejected.
  4. Known AI crawlers follow your policy: block, charge, or treat like a reader.
  • Base mainnet
  • Solana mainnet
  • Base Sepolia testnet
  • Solana Devnet testnet

USDC only, on these networks. No other tokens or chains.

For developers

What setup looks like

Register the plugin, edit the template that renders entry bodies, then set your payout wallet in the dashboard.

Early access. @x402-wp/emdash-paywall is being published to npm shortly. These snippets show the whole setup; join the early-access list to be told the moment npm install works.

1. Register it in astro.config.mjs
// astro.config.mjs
import node from "@astrojs/node";
import { defineConfig } from "astro/config";
import emdash from "emdash/astro";
import { x402Paywall } from "@x402-wp/emdash-paywall";

const paywall = x402Paywall(); // every option is optional

export default defineConfig({
  output: "server",
  adapter: node({ mode: "standalone" }),
  integrations: [
    emdash({
      // ...your existing database and storage settings
      plugins: [paywall.plugin],   // 1. the EmDash plugin
    }),
    paywall.integration,           // 2. the Astro integration
  ],
});
2. One template edit per template that renders an entry body
---
// src/pages/posts/[slug].astro
import { paywall } from "@x402-wp/emdash-paywall/astro";
import PaywalledContent from "@x402-wp/emdash-paywall/PaywalledContent.astro";

const { entry: post } = await getEmDashEntry("posts", slug);
const gate = await paywall(Astro, { collection: "posts", entry: post });
if (gate.response) return gate.response;
---

<!-- was: <PortableText value={post.data.content} /> -->
<PaywalledContent gate={gate} />

3. Finish in the EmDash admin

Open Plugins → Paywall settings and set the payout wallet. It becomes active only after a second confirmation step. Until then, paywalled entries stay locked. Test mode and the free x402.org facilitator are the defaults; switch to Coinbase CDP or PayAI when you go live.

If a template is missed, that page fails closed with an error instead of showing paid text.

Requirements

  • EmDash 1.0.1 or later (not 1.0.0)
  • Astro 6 or later, output: "server"
  • Node.js 22.16 or later
  • Tested with the Astro Node adapter

Compared

How it relates to @emdash-cms/x402

EmDash ships its own x402 package: an Astro integration that makes a page request require payment from template code, a good fit for charging agents per request. This plugin uses the same protocol and extends it for publishers: partial paywalls, human wallets, and a dashboard.

Capability @emdash-cms/x402 x402 Paywall for EmDash
What gets paywalled The page request, from template code A whole entry or a section of it, from an editor block
Where the price is set In astro.config (default) or per page in code Per entry by the author in the editor; site default in the dashboard
Who pays x402 clients such as AI agents, per request Human readers with a wallet, and AI agents per request
Reader wallet UI Not included EVM and Solana browser wallets, with mobile wallet-app links
Reader access after paying Each request carries its own payment Pay once, read for a set period (default 7 days)
Configuration Integration options in astro.config Settings dashboard in the EmDash admin, with an audit log

Use one or the other on a given site, not both. Upstream column describes @emdash-cms/x402 1.0.1.

FAQ

EmDash questions, answered

Which networks and tokens does the EmDash plugin support?

USDC only, on Base and Solana. Base Sepolia and Solana Devnet are available for testing. Test and live networks are never mixed. No other token or chain is supported.

What does it cost, and who pays the network fees?

The plugin is free during early access. We take no cut of your payments: USDC settles straight to your wallet. Readers only sign the payment and the facilitator pays the network fee. The x402.org facilitator is free but works on testnets only; for live payments you use Coinbase CDP or PayAI under their own terms.

Do I need to change my site's templates?

Yes, one small edit per template that renders an entry body: call the paywall gate at the top and render its content component instead of PortableText. EmDash has no render hook, so the template has to call the gate. If a template is missed, the request fails closed with an error instead of showing paid text.

Is paid text kept out of search, the content API and MCP?

Yes, for anyone who cannot edit the entry: paywalled entries are dropped from EmDash search results and paid blocks are removed from content API and MCP responses. If your own template calls search() directly, wrap the results with the provided filter helper. Title, excerpt and featured image stay public, so write the excerpt as a teaser.

Can I try it without real money?

Yes. The live demo at demodash.x402-wp.com runs on Base Sepolia and Solana Devnet test networks, so payments use test USDC with no real value. Your own site also starts in test mode with the free x402.org facilitator.

What do I need to run it?

EmDash 1.0.1 or later (not 1.0.0), Astro 6 or later with server output, and Node.js 22.16 or later. It is tested with the Astro Node adapter.

When will it be on npm?

Shortly — it is published as @x402-wp/emdash-paywall. Until then it is in early access: try the live demo and join the early-access list to hear the moment it is on npm.

Get early access

Try the paywall on the testnet demo now, and hear from us when the package is published.

Demo: demodash.x402-wp.com (test networks only)

EmDash is a project of Cloudflare; x402 Paywall is not affiliated with or endorsed by Cloudflare or the EmDash project. x402™ is a trademark of LF Projects, LLC. USDC is a trademark of Circle Internet Group, Inc. Names are used only to describe compatibility.