Add Account Billing section + Stripe Customer Portal CTA (#33) #71

Merged
westfarn merged 1 commits from feature/account-billing-portal into master 2026-07-31 03:54:07 -07:00
Owner

Summary

  • Closes #33
  • Add Billing glass cards on /account/ (Account2): current plan summary + billing history from GET /finance/invoices/ (and payments fallback)
  • Manage subscription CTA → POST /finance/portal/ → redirect to Stripe hosted Customer Portal (return URL /account/)
  • Empty / unpaid users get Complete payment → Checkout instead of a dead portal button
  • Visible errors for list/portal failures; fire BILLING_PORTAL_OPENED
  • Depends on backend portal endpoint: chat_backend#35

Test plan

  • npm test -- --watchAll=false --testPathPattern='(BillingSection|finance\\.test)'
  • Signed-in user with paid invoices: plan + history render; Manage subscription redirects to portal URL
  • User with no invoices: empty copy + Complete payment starts Checkout
  • Portal/list API errors show alert text (no silent fail)
  • Return from Stripe portal lands on /account/
  • No card fields collected in-app
## Summary - Closes [#33](https://git.aimloperations.com/ai_ml_operations/chat_web_app/issues/33) - Add Billing glass cards on `/account/` (`Account2`): current plan summary + billing history from `GET /finance/invoices/` (and payments fallback) - **Manage subscription** CTA → `POST /finance/portal/` → redirect to Stripe hosted Customer Portal (return URL `/account/`) - Empty / unpaid users get **Complete payment** → Checkout instead of a dead portal button - Visible errors for list/portal failures; fire `BILLING_PORTAL_OPENED` - Depends on backend portal endpoint: [chat_backend#35](https://git.aimloperations.com/ai_ml_operations/chat_backend/pulls/35) ## Test plan - [ ] `npm test -- --watchAll=false --testPathPattern='(BillingSection|finance\\.test)'` - [ ] Signed-in user with paid invoices: plan + history render; Manage subscription redirects to portal URL - [ ] User with no invoices: empty copy + Complete payment starts Checkout - [ ] Portal/list API errors show alert text (no silent fail) - [ ] Return from Stripe portal lands on `/account/` - [ ] No card fields collected in-app
westfarn added 1 commit 2026-07-31 03:48:35 -07:00
Add Account Billing section with Stripe Customer Portal CTA.
Unit Tests / test (pull_request) Successful in 11s
312990a6fb
Surface plan summary and invoice history on /account/, and redirect to Stripe's hosted portal for subscription management (#33).
westfarn merged commit 6a6e911ef8 into master 2026-07-31 03:54:07 -07:00
westfarn deleted branch feature/account-billing-portal 2026-07-31 03:54:08 -07:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: ai_ml_operations/chat_web_app#71