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
| Name | In | Type | Details |
|---|---|---|---|
organizationId | path | string | required
|
Request body
application/jsonStripeReturnUrlRequest
Where Stripe sends the browser back after a hosted flow.
1 field
returnUrlstringrequiredAbsolute 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
portalUrlstringrequirednullablePortal URL, or null when Stripe is not configured or the organization has no live Stripe subscription.
Other fields are allowed.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 500 | Internal Server Error |
|
| 502 | Bad Gateway |
|
| 503 | Service Unavailable |
|
Additional rules
The server also enforces these rules, which the schema above cannot express.
returnUrlparses as HTTP(S) and its origin matches the configured app origins.