Documentation Index
Fetch the complete documentation index at: https://docs.charlemagnelabs.ai/llms.txt
Use this file to discover all available pages before exploring further.
Create Checkout Session
Initiates a Stripe Checkout session for plan selection. Returns a URL to redirect the user to Stripe.Request Body
| Field | Type | Description |
|---|---|---|
plan | string | basic, pro, or enterprise |
cycle | string | monthly or annual |
Response
url to complete payment.
Open Billing Portal
Returns a Stripe Customer Portal URL where the user can manage their subscription, update payment methods, and download invoices.Response
Stripe Webhook
Receives Stripe webhook events. This endpoint must be configured as the webhook destination in the Stripe dashboard.This endpoint verifies the
Stripe-Signature header against your STRIPE_WEBHOOK_SECRET. Do not call this endpoint directly — it is for Stripe’s servers only.Handled Events
| Event | Action |
|---|---|
checkout.session.completed | Activates the subscription |
invoice.payment_succeeded | Renews the subscription period |
invoice.payment_failed | Triggers a payment failure notification |
customer.subscription.deleted | Marks the subscription as canceled |