The checkout answers three failures as bare text beside the plan #318

Open
opened 2026-11-02 06:23:25 +00:00 by cgalo5758 · 0 comments
Owner

What happens

Starting a checkout can fail three ways before Stripe is called, and each answers plain text instead of a notice:

  • "unauthorized" (401) when the request carries no signed-in member;
  • "price_id is required" (400) when the form posts no price;
  • "no billing account found" (400) when the member's organization has no billing account.

The checkout control swaps that text into its target as it is: lowercase, unstyled, with no next step. The two checkout refusals beside them (a plan or product that cannot be bought) already answer the notice part's Problem line with 422.

What should happen

Each failure answers the notice part's Problem line with a sentence a member can act on, at the status it has today, the way the refusals do. The words are decided with the fix.

Where

internal/server/billing.go, HandleCheckout (the three http.Error calls); refuseCheckout in the same file is the shape to follow.

Steps

An organization whose billing account row is missing; its member starts a checkout on any plan. The plan list shows "no billing account found" under the plan.

Why it matters

The last case is reachable in normal use, and a member who reads "no billing account found" has nothing to do next and no reason to think the console knows.

### What happens Starting a checkout can fail three ways before Stripe is called, and each answers plain text instead of a notice: - "unauthorized" (401) when the request carries no signed-in member; - "price_id is required" (400) when the form posts no price; - "no billing account found" (400) when the member's organization has no billing account. The checkout control swaps that text into its target as it is: lowercase, unstyled, with no next step. The two checkout refusals beside them (a plan or product that cannot be bought) already answer the notice part's Problem line with 422. ### What should happen Each failure answers the notice part's Problem line with a sentence a member can act on, at the status it has today, the way the refusals do. The words are decided with the fix. ### Where `internal/server/billing.go`, `HandleCheckout` (the three `http.Error` calls); `refuseCheckout` in the same file is the shape to follow. ### Steps An organization whose billing account row is missing; its member starts a checkout on any plan. The plan list shows "no billing account found" under the plan. ### Why it matters The last case is reachable in normal use, and a member who reads "no billing account found" has nothing to do next and no reason to think the console knows.
cgalo5758 added the
kind
bug
area/billing
labels 2026-11-02 06:23:26 +00:00
Sign in to join this conversation.
No labels area/billing
kind
bug
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: wiki-cafe/member-console#318