POST/organizations/{organizationId}/billing/stripe/checkout-session
Create an embedded Stripe checkout session
Operation organizations.billing.stripe.checkoutSession.create
Description
Creates a Stripe-hosted checkout session as a fallback to the inline form and returns its URL, or null when Stripe checkout is not configured; an ineligible organization gets an error instead. Only organization administrators may call it, and returnUrl must be on an approved app origin. It shares the inline checkout's attempt, so identical retries are safe and conflicting ones return 409.
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/jsonStripeCheckoutSessionResponse
A hosted Stripe Checkout page.
1 field
urlstringrequirednullableCheckout URL, or null when Stripe checkout is not configured.
Other fields are allowed.
Other responses
| Status | Meaning | Body |
|---|---|---|
| 400 | Bad Request |
|
| 401 | Unauthorized |
|
| 403 | Forbidden |
|
| 404 | Not Found |
|
| 409 | Conflict |
|
| 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.