Skip to main content
POST
Create a Stripe Customer Session for embedded components
This endpoint requires authentication. Include your Bearer token in the Authorization header.

Description

POST /billing/customer-session Ensures a Stripe customer exists, then returns a short-lived client_secret for Stripe embedded UI components (pricing table, payment element, etc.). Authorization:
  • Required role: owner only

Code Examples

Authorizations

Authorization
string
header
required

JWT Authorization header using the Bearer scheme. Format: "Bearer {token}"

Body

application/json
components
object

Stripe Customer Session component configuration (e.g. pricing_table.enabled = true); defaults applied server-side when omitted.

Response

Customer session created

status
string
Example:

"success"

message
string
data
object