Skip to content

Create a Stripe Checkout Session for the Pro subscription.

POST
/api/billing/subscription/checkout
curl --request POST \
--url https://api.tradr.cloud/api/billing/subscription/checkout

Authed; shares the per-user 10 / 60 s spend budget with the credit-pack checkout and the portal endpoint (plan-tiers D8). No request body — the Price sold is server-configured (STRIPE_PRO_PRICE_ID, REQ-2.2). Refuses 402 BILLING_NOT_AVAILABLE unless the Pro subscription is fully configured (REQ-2.7), and 409 SUBSCRIPTION_EXISTS when the user already has a qualifying subscription — including past_due and canceled-pending-period-end (REQ-2.4). Returns { url }, the Stripe-hosted checkout page. NO mirror write happens here — the mirror is the webhook’s job (REQ-3.2); the success URL returns to the billing tab in its ?subscription=confirming state (REQ-2.6).

{ url } — the Stripe-hosted checkout URL.

BILLING_NOT_AVAILABLE (Stripe or the Pro price unconfigured).

SUBSCRIPTION_EXISTS (a qualifying subscription already exists).

Shared checkout rate limit reached (10 / 60 s).

CHECKOUT_FAILED (Stripe returned no checkout URL).