Skip to content

feat: billing section on Account page (W10) - #177

Draft
HexaField wants to merge 2 commits into
devfrom
feat/billing-ui
Draft

feat: billing section on Account page (W10)#177
HexaField wants to merge 2 commits into
devfrom
feat/billing-ui

Conversation

@HexaField

Copy link
Copy Markdown
Contributor

Add a billing card to the Settings → Account page. Shows credit balance, signed-in email, and a 'Manage billing' link to the external billing portal (Stripe, Unyt, whatever the connector supplies).

Gating: only visible when hostAccount exists AND freeAccess is false — self-hosted nodes and free-tier users see nothing.

No platform-specific code. Any connector that populates BackendAccountInfo.billingPortalUrl gets the link. The platform connector does; a future desktop or community connector would not.

Changes

  • packages/app-shell/src/shared/backend/types.tsBackendAccountInfo gains billingPortalUrl?: string
  • packages/templates/shell/src/BillingSection.schema.ts — new schema node: credit balance (we-number), email row, billing portal button
  • packages/templates/shell/src/Settings.schema.ts — wires billingSection into the account section children

Zero new TypeScript errors (89 pre-existing in the schema system).

Part of the platform-collapse plan — moves billing visibility into WE so the platform reduces to a thin provisioning gateway.

🤖 Generated with Claude Code

Add a billing card to the Settings → Account page that shows credit balance,
signed-in email, and a 'Manage billing' link when connected to a metered
hosted node.

- BackendAccountInfo gains billingPortalUrl?: string — connectors that
  supply it get a billing link, those that don't (self-hosted) get nothing.
- BillingSection.schema.ts: credit balance row (we-number), email row,
  billing portal button — all gated on hostAccount existing with
  freeAccess false. No platform-specific code.
- Settings.schema.ts imports billing section between DID card and
  account-settings list.

The existing HostSettings credits display (on /connections) remains
unchanged — this adds billing visibility to the primary Account page
where a user first looks.

Zero new TypeScript errors (89 pre-existing in the schema system).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@HexaField
HexaField requested a review from jhweir as a code owner September 1, 2026 03:02
@netlify

netlify Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploy Preview for coasys-we ready!

Name Link
🔨 Latest commit b64d291
🔍 Latest deploy log https://app.netlify.com/projects/coasys-we/deploys/6a967943792ca4000849c669
😎 Deploy Preview https://deploy-preview-177--coasys-we.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Add a 'global' flag to SlotContribution — when true, the contribution
renders regardless of space-level module activation. The module registry
bypasses gateOnSpace for global slots.

Use case: platform module billing/account chrome needs to render in
Settings even when no space has the platform module active (the module
runs at account level, not space level).

Also adds a comment in Settings.schema.ts noting where module-contributed
settings nav items will go once $slot resolution lands in template content.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
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.

1 participant