Subscribe to an agent
Convert from trial or purchase a subscription via Stripe Checkout.
Paid agents use Stripe Checkout in subscription mode. Prices and token allowances are defined per agent product in Stripe (seeded in local dev).
Checkout flow
- User initiates checkout from the dashboard or API
- Server creates a Stripe Checkout Session with org and agent metadata
- User completes payment on Stripe
- Stripe webhook activates the subscription and agent instance
POST /api/organizations/{organizationId}/agents/{agentId}/checkout
Cookie: session=...
Response: { "url": "https://checkout.stripe.com/..." }Configure STRIPE_WEBHOOK_SECRET and forward events to POST /api/stripe/webhook in local dev (Stripe CLI).
