v2

latestOpenAPI 3.1.02026-08-05267431678.1 KB
billing

Upgrade Account

Upgrade user's account to Pro or Enterprise plan.

This endpoint creates a Stripe Checkout session for the user to complete payment. After successful payment, the webhook will update the user's plan and reset their token usage.

Args: request: Plan selection and redirect URLs auth: Authenticated user context

Returns: Checkout URL to redirect user to

post/billing/upgrade-account

Request body

plan'hobby' | 'pro' | 'enterprise' required

Target plan to upgrade to

success_urlstring required

URL to redirect to after successful payment

cancel_urlstring required

URL to redirect to if user cancels

force_checkoutboolean

When true, skip using existing payment method and always create a Stripe Checkout session.

Response

Successful Response

successboolean required
checkout_urlstring nullable
already_subscribedboolean
messagestring required