=== brainstrand Credits ===
Contributors: brainstrand
Tags: paywall, credits, membership, two-factor, captcha
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.1.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Let readers unlock articles for 1, 2 or 3 credits – with member accounts, two-factor login and a bot protection that needs no external service.

== Description ==

brainstrand Credits turns a blog into a simple members’ magazine:

* **1, 2 or 3 credits per article.** Choose the price in the editor. Everyone can read the first 3 paragraphs; readers unlock the rest with one click. Unlocked articles stay readable forever.
* **You grant the credits.** Credits → Grant credits, or in the user profile. Every booking is logged. Optional starting credits for new members.
* **Member accounts.** Registration, login, “forgot password” and a “My account” page with balance, unlocked articles and transactions – in the design of your theme.
* **Two-factor login** with any authenticator app (TOTP), including recovery codes. The QR code is created in the browser.
* **brainstrand protection.** “I am not a robot” for registration, login and password reset: the browser solves a small proof-of-work puzzle. No Google, no cookies, no third parties.
* **Security basics.** Login lockout after repeated failures, automatic logout after inactivity, security headers, XML-RPC off, no user enumeration.

Made for the theme **brainstrand Basis**, which shows balances, credit badges and the paywall box in its design. With other themes, the paywall box is added below the article content.

= Privacy =

The plugin does not contact any external service. It stores, for each member: name, email address, credit transactions and unlocked articles; for two-factor login the encrypted secret and hashed recovery codes. Reading history (which articles a member opened) is used for the “Others also read” recommendations.

== Installation ==

1. Install and activate the plugin.
2. The pages “My account”, “Register” and “Forgot password” are created automatically and registration for readers is enabled.
3. Mark articles as paid in the editor and grant credits under Credits → Grant credits.

== Frequently Asked Questions ==

= Can readers buy credits? =

Not in this version. You grant credits yourself, for example for a competition, a subscription you handle elsewhere, or as a thank-you.

= Can I change the price per article? =

You choose 1, 2 or 3 credits per article. The first 3 paragraphs are always free for everyone; this cannot be changed.

= I locked myself out. What now? =

Rename the folder wp-content/plugins/brainstrand-credits via FTP. WordPress deactivates the plugin.

== Changelog ==

= 1.1.0 =
* Price per article: free, 1, 2 or 3 credits.
* The first 3 paragraphs are free to read for everyone, including visitors without an account. Fixed, no longer adjustable.

= 1.0.0 =
* First release (previously part of the theme brainstrand Basis).

== Copyright ==

brainstrand Credits, Copyright 2026 brainstrand. Distributed under the terms of the GNU GPL v2 or later.

Bundled resources:

* QRCode for JavaScript – Copyright (c) 2009 Kazuhiko Arase – MIT License – https://github.com/kazuhikoarase/qrcode-generator
