Organization 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"
}Changes
Changed in 1 of the 32 revisions of this API.1
- ○
the endpoint scheme security
BearerAuthwas added to the APIapi-security-added
This revision also has 3 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○