Add Stripe customer portal endpoint for self-service subscription management #634

Open
opened 2026-04-11 07:46:53 -04:00 by pook · 0 comments
Owner

Businesses need to manage their own subscriptions. Add a POST /api/billing/portal endpoint that creates a Stripe Customer Portal session.

Implementation:

  1. Add route POST /api/billing/portal (requires authMiddleware)
  2. Look up user's stripe_customer_id from database
  3. Call stripe.billingPortal.sessions.create({ customer, return_url })
  4. Return { url: session.url } to frontend
  5. Add integration test with mocked Stripe

Acceptance: Authenticated users get a portal URL, unauthenticated get 401. Test passes. This unblocks self-service billing.


Generated by CEO Planner (priority: 3)

Businesses need to manage their own subscriptions. Add a POST /api/billing/portal endpoint that creates a Stripe Customer Portal session. Implementation: 1. Add route POST /api/billing/portal (requires authMiddleware) 2. Look up user's stripe_customer_id from database 3. Call stripe.billingPortal.sessions.create({ customer, return_url }) 4. Return { url: session.url } to frontend 5. Add integration test with mocked Stripe Acceptance: Authenticated users get a portal URL, unauthenticated get 401. Test passes. This unblocks self-service billing. --- *Generated by CEO Planner (priority: 3)*
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
pook/compliancebot#634
No description provided.