Skip to main content
GET
This endpoint creates a Stripe Customer Portal session and redirects the user to manage their subscription, payment methods, and billing history. The portal is hosted by Stripe and provides a secure, self-service interface for customers.

Authentication

This endpoint requires authentication. The user must be authenticated and associated with an organization that has a Stripe customer record.

Request

This endpoint does not require any request parameters. The organization is identified automatically from the authentication context.

Response

HTTP 302 Redirect
required
On success, this endpoint performs an HTTP 302 redirect to the Stripe Customer Portal URL. The browser will automatically navigate to the Stripe-hosted portal page.

Portal Features

The Stripe Customer Portal allows customers to:

Return URL

After the user completes their actions in the Customer Portal, they are redirected back to:
This ensures a seamless return to the organization settings page within the application.

Error Codes

Prerequisites

Before a user can access the Customer Portal, the organization must:
  1. Have a Stripe customer record - Created automatically when the organization first subscribes or purchases credits
  2. Be properly authenticated - User must be logged in via Clerk
  3. Be associated with an organization - User must be a member of an organization

Notes

  • This endpoint performs a redirect and does not return JSON on success
  • The Stripe Customer Portal session is valid for a limited time
  • All billing operations in the portal are handled securely by Stripe
  • Changes made in the portal (subscription updates, cancellations) are synchronized back to the application via Stripe webhooks