Tearleads

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

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/jsonStripeCheckoutSessionResponse

A hosted Stripe Checkout page.

1 field
  • urlstringrequirednullable

    Checkout URL, or null when Stripe checkout is not configured.

Other fields are allowed.

Other responses

StatusMeaningBody
400Bad Request

application/jsonErrorResponse

401Unauthorized

application/jsonSessionFailureResponse

403Forbidden

application/jsonErrorResponse

404Not Found

application/jsonErrorResponse

409Conflict

application/jsonBillingErrorResponse

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.