Something now checks that a buy button charges what the page says
The two Stripe price ids were swapped on the deployment and nothing in the codebase could have caught it, because every consumer treated them as identities to compare rather than as prices to check.
Found against the live billing page: the header read “Business” on the $9 subscription. One function maps a subscription’s price to a plan name, another opens a checkout session for whichever id it is handed, and fulfilment writes the plan from the first. Swap the two ids and all three keep working, confidently, in the wrong direction. The only symptom is a customer noticing.
The amount is what makes a swap decidable, and checking it needs no knowledge of the correct ids — which matters, because those live in a Stripe dashboard this repo cannot read. The checker asks Stripe what each configured id actually charges and compares that against what the page puts in front of a customer. The billing page now renders its numbers from the same constants, so the price a customer reads and the price this verifies are one value rather than two strings somebody keeps in step.
It reports each condition separately because each has a different fix: swapped ids, an amount matching no plan, the same id in both variables — which passes every equality check in the app, makes one plan permanently unsellable, and is invisible to an amount comparison — an id that does not exist, and a currency or interval that contradicts the ”$” and “/mo” in the copy. “Could not check” renders as itself and never as “is wrong”, because reporting a Stripe outage as a pricing defect sends an operator to go fix something correct.