Add Stripe customer portal session endpoint POST /api/billing/portal #773

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

Add POST /api/billing/portal that creates a Stripe billing portal session. Look up stripe_customer_id from DB by authenticated user, call stripe.billingPortal.sessions.create({ customer, return_url }), return { url }. Acceptance: returns 200 with portal URL, 401 without auth, 404 if user has no stripe_customer_id. Include unit test with mocked Stripe SDK. Contractpilot has this as #681 but compliancebot is missing it entirely — customers need subscription management.


Generated by CEO Planner (priority: 2)

Add POST /api/billing/portal that creates a Stripe billing portal session. Look up stripe_customer_id from DB by authenticated user, call stripe.billingPortal.sessions.create({ customer, return_url }), return { url }. Acceptance: returns 200 with portal URL, 401 without auth, 404 if user has no stripe_customer_id. Include unit test with mocked Stripe SDK. Contractpilot has this as #681 but compliancebot is missing it entirely — customers need subscription management. --- *Generated by CEO Planner (priority: 2)*
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#773
No description provided.