Tearleads

POST/organizations/{organizationId}/billing/stripe/portal

Create a Stripe customer portal session

Operation organizations.billing.stripe.portal.create

Description

Creates a Stripe customer portal session where an administrator updates payment details or downloads invoices, and returns its URL, or null when Stripe is not configured or the organization has no live Stripe subscription. Only organization administrators may call it, and returnUrl must be on an approved app origin.

Authentication

Requires a signed-in session: the client sends its session token as a bearer token in the Authorization header.

Parameters

NameInTypeDetails
organizationIdpathstringrequired
  • lowercase UUID v4

Request body

application/jsonStripeReturnUrlRequest

Where Stripe sends the browser back after a hosted flow.

1 field
  • returnUrlstringrequired

    Absolute HTTP(S) URL on one of the app origins the server allows.

Other fields are allowed.

Responses

200 OK

application/jsonStripePortalResponse

A Stripe customer portal page.

1 field
  • portalUrlstringrequirednullable

    Portal URL, or null when Stripe is not configured or the organization has no live Stripe subscription.

Other fields are allowed.

Other responses

StatusMeaningBody
400Bad Request

application/jsonErrorResponse

401Unauthorized

application/jsonSessionFailureResponse

403Forbidden

application/jsonErrorResponse

404Not Found

application/jsonErrorResponse

500Internal Server Error

application/jsonErrorResponse

502Bad Gateway

application/jsonErrorResponse

503Service Unavailable

application/jsonErrorResponse

Additional rules

The server also enforces these rules, which the schema above cannot express.

  • returnUrl parses as HTTP(S) and its origin matches the configured app origins.