Short answer
Leverprice computes the test price on your server with an open-source, zero-dependency SDK for TypeScript, Python, PHP, Ruby or Go, and ships no JavaScript to the browser. Every price is checked against the min and max in your own code, configs are signed, and any failure returns your fallback price within 500 ms.
- No Leverprice script runs in the visitor's browser; your server renders the price.
- The SDK refuses any price outside the minPrice and maxPrice in your own code, whatever the config says.
- All five SDKs pass the same conformance vectors, so a Go API and a Next.js front end agree on a visitor's price.
- One command, npx leverprice setup, connects Claude Code, Codex, Cursor, VS Code, Gemini CLI and Windsurf to the Leverprice MCP server.
- Regional prices read the visitor's country from a header your CDN sets, with no default, so visitors can't pick their own price.
Your buyers open the network tab. A pricing experiment that loads a third-party script, swaps the price after the page renders or trusts a price sent from the browser is the kind of thing that ends up in a screenshot on a forum.
Leverprice runs on your server (why server-side). The SDK hands your code a number in minor units; you render it, charge it and pass a signed attribution record to your checkout. The browser only gets a first-party cookie from your server, so the visitor keeps the same price.
Why is price testing different for developer tools?
Because your buyers can see how it works, and your checkout path can't gain a new way to fail.
The price comes from a signed config: an offline root key signs a keyset, the keyset signs the config, versions only move forward and configs expire. The SDK also checks every price against the minPrice, maxPrice and currency in your own code, so even a bad config can't make your server charge outside your bounds. Signed price configs walks through the chain, and the security page covers the rest.
Failure is boring by design. No signed config within 500 ms, an error, an outage or LEVERPRICE_DISABLED=1 all return your own fallbackPrice, and getPrice() doesn't throw for any of them.
Consistency matters with a technical audience. Each visitor keeps one price through an HMAC-signed first-party cookie, and signed-in users keep it across devices through the user id you pass, hashed on your server.
What should a developer tool price test first?
The price people see when they move from the free tier to paid. After that, whatever you sell outside a subscription, then team pricing.
1. The individual Pro plan
Example: $10, $15 or $20 a month for a single developer. Doubling the price only has to keep half of your buyers to break even (1 - 10/20 = 0.5, before fees).
2. A one-time license for a CLI or desktop app
Example: $49, $79 or $99 for a perpetual license. The first payment is the whole sale, and all four supported providers confirm one-time payments through a signed webhook (on Stripe, through Checkout).
3. The per-seat price of a team plan
Example: $12, $16 or $20 per seat per month. Your checkout charges seats × quote.price and the test counts the order total, so revenue per visitor reflects team size as well as conversion. Team plans are usually subscriptions. Polar verifies the first payment by webhook and Dodo Payments verifies one-time payments only, while a Stripe subscription's first payment is reported with trackPurchase() and shows as unverified. Set the project's Learn from setting to Reported so the engine learns from it.
How does Leverprice fit a developer tool's stack?
Five open-source SDKs with zero dependencies. All of them pass the same conformance vectors, so a Go API and a Next.js front end agree on a visitor's price.
npm install @leverprice/sdk # Node 20+, Bun, Deno, Workers, Lambda
pip install leverprice # Python 3.9+, sync and async
composer require leverprice/leverprice-php # PHP 8.1+
bundle add leverprice # Ruby 3.1+
go get github.com/leverprice/leverprice-go # Go 1.22+Here is a one-time license sold through Stripe Checkout, with lib/leverprice.ts holding one shared client and a license product as in the docs:
import Stripe from "stripe";
import { leverprice } from "@/lib/leverprice";
const stripe = new Stripe(process.env.STRIPE_SECRET_KEY!);
export async function POST(request: Request) {
const quote = await leverprice.getPrice("license", { request });
const session = await stripe.checkout.sessions.create({
mode: "payment",
line_items: [
{
quantity: 1,
price_data: { currency: quote.currency, unit_amount: quote.price, product_data: { name: "CLI license" } },
},
],
metadata: quote.metadata,
payment_intent_data: { metadata: quote.metadata },
success_url: "https://example.com/thanks",
cancel_url: "https://example.com/pricing",
});
const headers = new Headers({ Location: session.url! });
for (const cookie of quote.setCookie) headers.append("Set-Cookie", cookie);
return new Response(null, { status: 303, headers });
}Regional prices go through the same call. Name the header your CDN sets in countryHeader (cf-ipcountry, x-vercel-ip-country or cloudfront-viewer-country) or pass country to getPrice(); there's no default on purpose, so visitors can't pick their own price.
A regional guard on each product lists the currencies you allow with their own bounds, quote.country and quote.regional tell you what was served, and the checkout above already passes quote.currency. Bots and visitors with an unknown country get the standard price. Regional pricing covers the tiers and presets.
For agents, npx leverprice setup finds Claude Code, Codex, Cursor, VS Code, Gemini CLI and Windsurf and adds the MCP server at https://app.leverprice.com/mcp to each. An agent can create products, start and stop tests, read results and lock in winners, acting as you, and every change lands in the audit log under its name. Where there's no browser, such as CI, a personal access token works instead, and a read-only token can read results but change nothing.
How do you set up a price test in a developer tool?
- Create a project. The test key (
pp_sk_test_…) and live key (pp_sk_live_…) are shown once; keep them in your server's environment. - Install the SDK and declare the product with
fallbackPrice,minPriceandmaxPricein minor units. - Call
getPrice()where the price renders and again where the checkout is created. Chargequote.priceinquote.currency, append everyquote.setCookievalue and passquote.metadatawhole. - In Payments, add the webhook URL to your provider and paste back the signing secret.
- Check in test mode that purchases arrive verified, switch to the live key and start. From then on, your agent can watch the results and lock in the winner over MCP.
Which Leverprice plan fits a developer tool?
Free covers one product and one experiment with a manual A/B split and up to $500 a month in tested revenue, enough to wire it in and run a first split. Pro adds automatic optimization and unlimited tested revenue for $29 a month or $199 a year (about $17 a month), and covers up to 20 sites, so several tools with their own sites fit on one plan. Lifetime is $299 once for everything in Pro, with 50 spots. Paid periods are non-refundable, so start on Free or monthly.
Frequently asked questions
Does the SDK add latency to my pricing page?
It computes prices locally from a signed config that it refreshes every 30 seconds. Before the first config arrives it waits at most 500 ms, then returns your fallback price. Call preload() at startup on long-lived servers, and flush() before a serverless function returns.
Will my own tests and monitors pollute the results?
Headless browsers, crawlers, link previews and monitors are never enrolled, and prefetches aren't counted. Anything else you run against production counts like a visitor, so do QA on staging with the test key: test and live mode are kept separate.
What can an AI agent do with my Leverprice account?
Create products, start and stop tests, read results and lock in winners. It acts as you, every change appears in the audit log under the agent's name, and a read-only token limits it to reading.
What happens if Leverprice disappears?
Your server keeps selling at your fallbackPrice. With no signed config the SDK returns it, and LEVERPRICE_DISABLED=1 stops every network call and cookie.