Skip to main content

Create Setup Intent

POST 

/api/billing/stripe/create-setup-intent

Create a Stripe SetupIntent for saving payment methods without immediate payment.

This endpoint creates a SetupIntent that can be used with Stripe's Payment Element to collect and save payment method details for future charges.

The user's existing Stripe customer ID (if any) is retrieved from leads.customer_stripe_id. If no customer exists, a new one is created.

Args: lead_id: Optional lead/user ID. If not provided, uses authenticated user.

Returns: SetupIntentResponse with client_secret for frontend Payment Element

Request

Responses

Successful Response