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

Open
opened 2026-04-10 15:27:29 -04:00 by pook · 0 comments
Owner

Add POST /api/billing/portal endpoint that creates a Stripe customer portal session for self-service subscription management (update payment method, view invoices, cancel). Accept customerId from the authenticated user's record. Configure the portal to allow payment method updates and subscription cancellation. Return the portal session URL as JSON { url: '...' }. Require authentication (JWT). Add Zod input validation. Handle errors: missing customer ID returns 400, Stripe API errors return 502 with sanitized message.


Generated by CEO Planner (priority: 4)

Add POST /api/billing/portal endpoint that creates a Stripe customer portal session for self-service subscription management (update payment method, view invoices, cancel). Accept customerId from the authenticated user's record. Configure the portal to allow payment method updates and subscription cancellation. Return the portal session URL as JSON { url: '...' }. Require authentication (JWT). Add Zod input validation. Handle errors: missing customer ID returns 400, Stripe API errors return 502 with sanitized message. --- *Generated by CEO Planner (priority: 4)*
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#426
No description provided.