Documentation
Connecting Stripe
If you are running Counterfirm on your own WordPress, this is the whole billing path: five products in Stripe, one webhook, and one mapping table in the plugin settings. It takes about twenty minutes and needs no code.
What talks to what
Counterfirm does not take payments itself and never sees a card. Paid Memberships Pro handles the checkout and holds the subscription. Stripe is the gateway behind it. The app plugin reads one thing from all of that: which membership level the logged in user holds.
That single number is mapped to a plan name, and the plan name is mapped to limits. So if you want to change what a plan allows, you change a number in a settings table. You do not touch Stripe and you do not touch code.
- Stripe holds the product, the price and the subscription
- Paid Memberships Pro holds the level and the checkout
- Counterfirm holds the mapping from level to plan, and the limits per plan
- Nothing in Counterfirm ever stores a card, a token or a Stripe customer id
Step by step
Twenty minutes, start to finish
- 1
Install Paid Memberships Pro
The free version is enough. Plugins, Add New, search for Paid Memberships Pro, install and activate. You do not need any of its paid add ons for this.
- 2
Create five membership levels
Memberships, Settings, Levels. Create Free, Explore, Operator, Boardroom and Enterprise in that order, so they take ids one to five. Free is a level with a price of zero and no billing. Give each paid level its monthly price and tick recurring.
- 3
Put your Stripe keys in
Memberships, Settings, Payment Gateway. Choose Stripe, then either connect with the button or paste your publishable and secret keys. Start in test mode. There is a test mode toggle on that same screen.
- 4
Add the webhook
That screen shows you a webhook URL ending in /wp-json/pmpro/v1/webhook/stripe. Copy it. In the Stripe dashboard go to Developers, Webhooks, Add endpoint, paste it, and select the subscription and invoice events Stripe suggests for a subscription integration. Save, then copy the signing secret back into the payment gateway screen.
- 5
Map the levels to plans
Counterfirm, Settings, Access. There is one field holding a small mapping, which arrives already filled in as level one is free, two is explore, three is operator, four is boardroom, five is enterprise. If your level ids came out differently, change the numbers here to match. This is the only Counterfirm setting that billing touches.
- 6
Set the free plan
On the same screen, Free plan says which plan a signed in user gets when they hold no membership at all. Leave it as free unless you want signup to require payment, in which case set it to none.
- 7
Check it with a test card
While still in test mode, sign up for Explore with card number 4242 4242 4242 4242, any future expiry and any three digit code. Then open the app. The plan name in the corner should say Explore and the limits screen should show sixty runs a month.
- 8
Turn test mode off
Switch the gateway to live, swap in your live keys, and add a second webhook endpoint in the live half of the Stripe dashboard with the same URL. Test and live webhooks are separate in Stripe and forgetting the live one is the single most common mistake here.
The whole path on one line
The mapping
What each plan allows
These are the values shipped in the plugin. They are editable in Counterfirm, Settings, Plans, and anything you change there takes effect on the next page load without touching Stripe.
| Limit | Free | Explore | Operator | Boardroom | Enterprise |
|---|---|---|---|---|---|
| Twins | 1 | 1 | 3 | 10 | 100 |
| Files per twin | 3 | 15 | 120 | 800 | 10,000 |
| Runs a month | 10 | 60 | 600 | 5,000 | Effectively none |
| Sweeps a month | None | 2 | 40 | 300 | Effectively none |
| Replications per run | 60 | 150 | 400 | 1,000 | 1,000 |
| Longest horizon | 12 months | 24 months | 36 months | 60 months | 60 months |
| Seats | 1 | 1 | 3 | 10 | 100 |
| Train the network | No | Yes | Yes | Yes | Yes |
| Shared language model allowance | No | No | Yes | Yes | Yes |
| Export briefs | No | Yes | Yes | Yes | Yes |
| API access | No | No | No | Yes | Yes |
A run is a scenario against its baseline on the same seeds. A sweep is one lever across a range and counts as one sweep however many simulations it contains. What each plan costs.
When something goes wrong
Somebody paid but the app still says free
Nine times out of ten the webhook did not arrive. Open Developers, Webhooks in Stripe, click your endpoint, and look at recent deliveries. A red entry there tells you whether the URL is wrong or the signing secret does not match.
The other time, the level id does not match the mapping. Check Memberships, Settings, Levels for the real id and put that number in the Access mapping.
Payments work in test mode but not live
You almost certainly have a test webhook and no live one. Stripe keeps the two dashboards separate, including webhook endpoints. Add the same URL again on the live side and copy the live signing secret into the gateway screen.
Somebody cancelled but still has access
That is correct until the end of the period they paid for. After that Paid Memberships Pro drops the level, the mapping drops the plan, and the plugin falls back to whatever Free plan is set to. Their twins and files are untouched.
A downgrade puts somebody over a limit
Nothing is deleted. The app stops them creating more and asks which twins to keep active. Everything stays readable so that a failed card does not destroy a month of work.
Can I use a different gateway?
Yes. Counterfirm only reads the membership level, so any gateway Paid Memberships Pro supports will work. Stripe is documented here because it is what most people use.
Can I run without any billing at all?
Yes, and this is common for a single company running its own twin. Leave Paid Memberships Pro uninstalled and set Free plan to the plan you want everybody to have. The mapping is ignored when no membership plugin is present.
Do I need Paid Memberships Pro at all for the free tier?
No. The free tier is what a signed in user with no membership gets, so a site with no billing plugin at all still gives everybody one twin, three files and ten runs a month.
Counterfirm never stores card details, Stripe tokens or customer identifiers. It reads one integer: the membership level of the current user. If you audit one thing before going live, audit that, because it is the whole of the billing surface inside this plugin.
Stuck on a step?
Send the step number and what you are seeing. A person answers, and if the instruction above is wrong it gets fixed on this page.