With no Stripe key, the member catalog still offers products whose prices were synced earlier, and their buttons post to a route that does not exist #282

Closed
opened 2026-10-28 02:44:21 +00:00 by cgalo5758 · 1 comment
Owner

What happens

Some terms first. A price mapping is the console's record of the Stripe price a console price was synced to. The key mode is whether the deployment's Stripe key is a test key or a live key; with no key it is empty.

A deployment can run without a Stripe key, and the member pages then should not offer anything for sale. They decide whether a price can be bought from its mapping. The loader that reads it is built from the database whether or not a key is set (newPositionLoader, internal/server/plan_offer.go:39-50, called with the handler's database at member_addons.go:100, member_plans.go:289, member_plan_moves.go:173, billing.go:264 and plan_offer.go:345), and it passes "a database is present" as "Stripe is configured" (plan_offer.go:239). So it reads the mapping (internal/server/product_readiness.go:81-91), and an empty key mode reaches every mapped Stripe id (MappingReachable, internal/integrations/stripe/store/mapping_environment.go:91-94).

A deployment that once had a key and synced its prices keeps those mappings after the key is removed. Its Products page then lists each add-on with its Add button, and its Plans page enables Subscribe. Checkout is registered only when a key is set (internal/server/server.go:689-699), so the button posts to POST /billing/checkout, which nothing serves, and the purchase fails.

The operator's product page tells the truth: its "Payment processing" row reads "Stripe is not configured for this deployment" and the verdict is Incomplete (internal/server/product_readiness.go:494-495), because the page takes "configured" from the key and the webhook secret (internal/server/server.go:602).

What should happen

With no Stripe key, the member pages offer nothing for sale, whatever mappings the database holds, and agree with the operator's product page.

Where

internal/server/plan_offer.go:39-50, :239; internal/server/product_readiness.go:81-91; internal/integrations/stripe/store/mapping_environment.go:91-94; internal/server/server.go:602, :689-699.

Steps

  1. Start the console with a Stripe key, create a product with a recurring price, sync it, and mark it Listed.
  2. Stop the console, remove the Stripe key and webhook secret from its configuration, and start it again.
  3. As a member, open Products: the product is listed with Add. Press Add: nothing serves the request, and no Checkout opens.
  4. As an operator, open the product's page: "Payment processing" reads that Stripe is not configured.

Why it matters

A member is offered a purchase the deployment cannot take and cannot complete it, and the member pages contradict the operator's page about the same product.

### What happens Some terms first. A price mapping is the console's record of the Stripe price a console price was synced to. The key mode is whether the deployment's Stripe key is a test key or a live key; with no key it is empty. A deployment can run without a Stripe key, and the member pages then should not offer anything for sale. They decide whether a price can be bought from its mapping. The loader that reads it is built from the database whether or not a key is set (`newPositionLoader`, `internal/server/plan_offer.go:39-50`, called with the handler's database at `member_addons.go:100`, `member_plans.go:289`, `member_plan_moves.go:173`, `billing.go:264` and `plan_offer.go:345`), and it passes "a database is present" as "Stripe is configured" (`plan_offer.go:239`). So it reads the mapping (`internal/server/product_readiness.go:81-91`), and an empty key mode reaches every mapped Stripe id (`MappingReachable`, `internal/integrations/stripe/store/mapping_environment.go:91-94`). A deployment that once had a key and synced its prices keeps those mappings after the key is removed. Its Products page then lists each add-on with its Add button, and its Plans page enables Subscribe. Checkout is registered only when a key is set (`internal/server/server.go:689-699`), so the button posts to `POST /billing/checkout`, which nothing serves, and the purchase fails. The operator's product page tells the truth: its "Payment processing" row reads "Stripe is not configured for this deployment" and the verdict is Incomplete (`internal/server/product_readiness.go:494-495`), because the page takes "configured" from the key and the webhook secret (`internal/server/server.go:602`). ### What should happen With no Stripe key, the member pages offer nothing for sale, whatever mappings the database holds, and agree with the operator's product page. ### Where `internal/server/plan_offer.go:39-50`, `:239`; `internal/server/product_readiness.go:81-91`; `internal/integrations/stripe/store/mapping_environment.go:91-94`; `internal/server/server.go:602`, `:689-699`. ### Steps 1. Start the console with a Stripe key, create a product with a recurring price, sync it, and mark it Listed. 2. Stop the console, remove the Stripe key and webhook secret from its configuration, and start it again. 3. As a member, open Products: the product is listed with Add. Press Add: nothing serves the request, and no Checkout opens. 4. As an operator, open the product's page: "Payment processing" reads that Stripe is not configured. ### Why it matters A member is offered a purchase the deployment cannot take and cannot complete it, and the member pages contradict the operator's page about the same product.
cgalo5758 added this to the Public launch milestone 2026-10-28 02:44:21 +00:00
cgalo5758 added the
kind
bug
area/billingarea/member-ui
labels 2026-10-28 02:44:21 +00:00
Author
Owner

The operator's product page and the member Products page now decide by one rule whether a member can find and buy a product. The product page's readiness panel asks the same price rule Checkout and the member pages ask: the product is published, active and listed, and its default price is recurring and has a Stripe price the current key can reach. Its "Member catalog visibility" row reads Shown when the member pages show the product: a plan tier in its plan sections, or a product on no ladder in the products list once its default price can be bought. The display category no longer decides anything there. A product whose default price is one-time now reads "Incomplete; missing: recurring default price" instead of Purchasable, and because a product that can be bought is always shown, the "not shown in the member catalog" note is gone from the panel and the products list.

A deployment with no Stripe key now offers nothing for sale on the member pages, whatever the console's records of prices synced under an earlier key say: products on no ladder are not listed, and plan tiers show their buy control disabled, as the operator's product page already said. The member pages, the operator's product page and the Checkout route take "Stripe is configured" from one place, the key's mode the console reads at start.

Commit: 5c454adc

The operator's product page and the member Products page now decide by one rule whether a member can find and buy a product. The product page's readiness panel asks the same price rule Checkout and the member pages ask: the product is published, active and listed, and its default price is recurring and has a Stripe price the current key can reach. Its "Member catalog visibility" row reads Shown when the member pages show the product: a plan tier in its plan sections, or a product on no ladder in the products list once its default price can be bought. The display category no longer decides anything there. A product whose default price is one-time now reads "Incomplete; missing: recurring default price" instead of Purchasable, and because a product that can be bought is always shown, the "not shown in the member catalog" note is gone from the panel and the products list. A deployment with no Stripe key now offers nothing for sale on the member pages, whatever the console's records of prices synced under an earlier key say: products on no ladder are not listed, and plan tiers show their buy control disabled, as the operator's product page already said. The member pages, the operator's product page and the Checkout route take "Stripe is configured" from one place, the key's mode the console reads at start. Commit: 5c454adc
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#282