payments: the portal's upgrade surface and typed calls into the payment service #145

Stängd
öppnade 2026-08-01 14:49:39 +00:00 av supernaut · 0 kommentarer
Ägare

Replaces #34 and #35, which were filed before the payments architecture was decided and asked for the
schema and the provider integration to be built in this repository. Both belong to the separate
private payment service. This issue is the part that genuinely remains here.

Scope

The portal's role is the upgrade surface and the typed client calls — not billing state, not the
provider.

  • The upgrade path from the account panel: show the current plan, offer the upgrade, hand off to hosted
    checkout, and handle the return.
  • Read subscription and seat status for display. The portal must not compute entitlements from it —
    Kanidm group membership is the seam, and the reconciler projects it onto Forgejo.
  • Organisation seat management, if the org product is in scope at that point. Note that organisation
    creation is currently granted to nobody (the Kanidm ent_orgs group was emptied on 2026-08-01, because
    an organisation is a priced add-on), so the org path has an infrastructure prerequisite outside this
    repo.

Already in place

  • PAYMENTS_ENABLED (src/lib/payments-access.ts) gates the whole surface, off by default. The inverted
    polarity is deliberate: a missing or mistyped variable leaves payment surfaces dark rather than
    exposing half-built billing.
  • The service publishes a public contract package of zod schemas and router types, so these calls are
    typed end to end with no codegen. Import that rather than hand-rolling request shapes.
  • /pricing already carries the prices and states that paid accounts are not yet purchasable.

Blocked on

The payment service being deployed and reachable. Until then this cannot be built beyond the UI shell,
and building the shell against an unpublished contract is how the shapes drift.

Label is blocked rather than ready-for-implementation for that reason — the dependency is real and
outside this repo, and marking it ready would misrepresent it as pickable.

Replaces #34 and #35, which were filed before the payments architecture was decided and asked for the schema and the provider integration to be built **in this repository**. Both belong to the separate private payment service. This issue is the part that genuinely remains here. ## Scope The portal's role is the **upgrade surface and the typed client calls** — not billing state, not the provider. - The upgrade path from the account panel: show the current plan, offer the upgrade, hand off to hosted checkout, and handle the return. - Read subscription and seat status for display. The portal must not compute entitlements from it — Kanidm group membership is the seam, and the reconciler projects it onto Forgejo. - Organisation seat management, if the org product is in scope at that point. Note that organisation creation is currently granted to nobody (the Kanidm `ent_orgs` group was emptied on 2026-08-01, because an organisation is a priced add-on), so the org path has an infrastructure prerequisite outside this repo. ## Already in place - `PAYMENTS_ENABLED` (`src/lib/payments-access.ts`) gates the whole surface, off by default. The inverted polarity is deliberate: a missing or mistyped variable leaves payment surfaces dark rather than exposing half-built billing. - The service publishes a **public contract package** of zod schemas and router types, so these calls are typed end to end with no codegen. Import that rather than hand-rolling request shapes. - `/pricing` already carries the prices and states that paid accounts are not yet purchasable. ## Blocked on The payment service being deployed and reachable. Until then this cannot be built beyond the UI shell, and building the shell against an unpublished contract is how the shapes drift. Label is `blocked` rather than `ready-for-implementation` for that reason — the dependency is real and outside this repo, and marking it ready would misrepresent it as pickable.
supernaut lade till detta till projektet Bitborg Web 2026-08-01 14:49:50 +00:00
supernaut 2026-10-01 19:10:48 +00:00
Logga in för att delta i denna konversation.
Ingen milstolpe
Inget projekt
Inga tilldelade
1 deltagare
Notiser
Förfallodatum
Förfallodatumet är ogiltigt eller utanför gränserna. Använd formatet "åååå-mm-dd".

Inget förfallodatum satt.

Beroenden

Inga beroenden satta

Referens
bitborg/bitborg-web#145
Ingen beskrivning angiven.