Skip to content

feat(cms): billing and plan in the Payload admin (PX3) - #24

Merged
ruehowl merged 1 commit into
mainfrom
orun/PX-4-billing-v2
Oct 28, 2026
Merged

ruehowl merged 1 commit into
mainfrom
orun/PX-4-billing-v2

Conversation

@ruehowl

@ruehowl ruehowl commented Oct 28, 2026

Copy link
Copy Markdown
Contributor

PX3 of the lumen-payload-console epic (task PX-4, milestone PX3). The old console's billing page moves into the Payload admin as Billing & plan (/admin/organization/billing), under the Account group from PX2.

What it shows and does

  • Shows: the organization's current plan, its entitlements, the plans it can move to, and its invoices. All of it is read through api-edge with the signed-in person's session.
  • Upgrade: starts the provider's checkout, which returns to /admin/organization/billing?checkout=complete. The page then reconciles the subscription with a same-origin form post, not a client-side fetch.
  • Switch or cancel a paid plan, each behind a confirm step. Manage billing opens the provider's customer portal.
  • Guards: the form accepts only same-origin posts from staff, and sends the browser only to an https provider page.
  • No payment provider configured (stage today): Upgrade and the portal say so instead of failing.
  • Docs: runbook, architecture, overview, operations guide, epic status.

Verification

  • PX2 is deployed and verified on stage: 26/26 end-to-end checks against the deployed admin, including the security-events list (now working) and a live check that a bearer's own-account reads aren't cut off at 10/min.
  • This branch's tree is identical to the tip that passed local end-to-end verification: 11/11 checks against the built Worker and stage's real api-edge, plus the cms test suites, typecheck and lint.
  • After merge, I'll run the billing checks on stage. They cover every doneWhen in tasks/PX-4.TaskContract.yaml, including the "no provider configured" path stage takes today.

Orun-Task: PX-4



Generated by Claude Code

The old console's billing page moves into the Payload admin as Billing &
plan (/admin/organization/billing), under the Account group: the
organization's current plan and entitlements, the plans it can move to,
and its invoices, read through api-edge with the signed-in person's
session.

- Upgrade starts the provider's checkout, which returns to the CMS
  (/admin/organization/billing?checkout=complete); the page then reconciles
  the subscription with a same-origin form post, not a client fetch
- switch or cancel a paid plan behind a confirm step; Manage billing opens
  the provider's customer portal
- the billing form accepts only same-origin posts from staff, and sends
  the browser only to an https provider page
- where no payment provider is configured (stage), Upgrade and the portal
  say so instead of failing
- docs: runbook, architecture, overview, operations guide; epic status

Orun-Task: PX-4

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013JuHbkZCjDrGgHdzCrCRqG
@ruehowl
ruehowl marked this pull request as ready for review October 28, 2026 21:02
@ruehowl
ruehowl merged commit c88c00a into main Oct 28, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants