=== checkout402 Paywall ===
Contributors: checkout402
Tags: paywall, micropayments, monetization, pay per article, ai crawlers
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 0.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Charge for your writing, one article at a time. Readers pay in the page they are reading. Crawlers get a price instead of your text.

== Description ==

Put any post or page behind a small payment. The opening stays free, so search
engines still index you and readers can still judge whether to buy. Everything
after the paywall point is served only to someone who paid for it.

**Readers do not make an account.** No subscription, no password, no email.
They pay once and keep reading.

**Scrapers pay the same price as everyone else.** An AI crawler asking for the
page gets an HTTP 402 with the price on it, in the format agents already
understand. It can pay and read, or leave. Either is better than taking your
work for nothing.

= Why this is not the usual paywall =

Most WordPress paywalls hide the text with CSS or a template tag. That is a
paywall that has already served the text: `curl` sees it, a scraper sees it,
and so does any reader who opens their browser console.

This plugin removes the paid part from the HTML entirely. It is not hidden, it
is not there. So there is no bot detection anywhere in it, nothing to
fingerprint, and no chance of blocking a real reader who happened to look
robotic.

= Your posts stay in WordPress =

Nothing is uploaded. The paid part of a post is fetched back from your own
site, over a private route, at the moment someone pays for it. Your post is
never copied anywhere, cannot drift out of date, and an edit is live for the
next reader with nothing to re-sync.

= What it covers =

WordPress serves the same post through the page, the REST API and RSS, and
they do not share filters. Paywall plugins routinely close the first and leave
the other two wide open. This one closes all three.

= Three ways to use it =

* **In WordPress.** A Paywall column on the Posts list with a one-click
  toggle, a bulk action for gating many posts at once, and a panel on the post
  itself. A Paywall block marks where the free part ends. Roles, individual
  people and membership plugins can all be let through.
* **Over REST.** Every action has a route under `/wp-json/checkout402/v1/`.
* **From an agent.** The plugin runs a small MCP server, so Claude (or
  anything else that speaks MCP) can list your posts and gate them for you.
  Paste the endpoint and token from the settings page.

The three are generated from one table of operations, so they do the same
things and cannot drift apart.

= Earnings =

The Paywall screen shows sales and revenue per article. The full picture,
including payouts, lives in your checkout402 dashboard.

== Installation ==

1. Install and activate the plugin.
2. Create a free account at checkout402.com and copy an API key.
3. Paste the key into **Paywall → Settings**. The page checks it immediately
   and tells you which wallet your readers' payments will land in.
4. On the Posts list, click **Gate this** on any post.

There is no payout wallet to configure here. checkout402 will not issue a key
to an account that has nowhere to be paid, so by the time you have a key you
already have one, and it stays in one place rather than two.

Payments settle in USDC on Base or Solana, directly to your wallet.
checkout402 never holds your money.

== Frequently Asked Questions ==

= Do my readers need a crypto wallet? =

To pay, yes, or an agent that has one. This suits publications whose readers
already hold one, and any site whose traffic is increasingly machines.

= Can I let some people read free? =

Yes. Exempt whole roles from the settings screen, one person from their user
profile, or a role from one particular post. Anyone who can edit a post always
reads it free. Membership plugins can decide for themselves through the
`c402_reads_free` filter, so readers who already subscribe to you never meet a
second paywall.

= Will this hurt my search ranking? =

No, provided the free part stays substantial. The block includes Google's
documented paywalled-content markup, which is what makes serving a crawler
differently from a reader sanctioned rather than cloaking. Your post stays the
canonical URL.

= Does it work with page caching? =

Yes, and better than most. The page a visitor is served is identical for
everyone, so it caches normally. The paid part is fetched separately and never
cached.

= What happens if my site is down when someone reads? =

They see a clear message saying the article could not be fetched and that their
pass is still valid. They are not charged again.

= Is my content sent to a third party? =

Only to the reader who paid for it. checkout402 fetches the paid part from your
site at that moment and passes it on. It is not stored as a copy of your post.

== External services ==

This plugin connects to checkout402 (https://checkout402.com), which takes the
payment and serves the paid part of a post to whoever paid.

Sent when you gate a post: the post title, the free opening, the author name,
the publish date, the permalink and the tags. This is what the payment page
shows and what search engines read.

Sent when a reader pays: nothing by this plugin. checkout402 requests the paid
part of that post from your site.

Terms: https://checkout402.com/terms · Privacy: https://checkout402.com/privacy

== Screenshots ==

1. A gated article as a reader meets it: the opening, then the price.
2. The same article once paid for, continuing in your own theme.
3. The Posts list, with a one-click toggle per post.
4. Paywall earnings, per article.

== Changelog ==

= 0.1.0 =
* First release.
