v5
latestOpenAPI 3.1.02026-08-025631,1012.8 MBOrganization Billing
Setup Payment Method
Initialize payment method setup flow.
Creates a Stripe SetupIntent for collecting payment method without charging. The client_secret should be used with Stripe Elements on the frontend.
Flow:
- Frontend calls this endpoint
- Backend creates Stripe Customer (if needed) and SetupIntent
- Frontend uses client_secret with Stripe Elements
- User enters card details
- Frontend calls confirm-payment-method endpoint
Requirements:
- Admin permission (only org admins can set up payment methods)
Example:
response = await client.post("/v1/organizations/billing/setup-payment-method")
client_secret = response["client_secret"]
# Use client_secret with Stripe Elements
post/v1/organizations/billing/setup-payment-method
Response
Successful Response
Example response
{
"setup_intent_id": "seti_1ABC2DEF3GHI",
"client_secret": "seti_1ABC2DEF3GHI_secret_XYZ",
"customer_id": "cus_ABC123DEF456"
}