latestOpenAPI 3.1.02026-08-218667571.2 MB

a8ca30023371

User APIs
plans

Get User Plans

Get all active subscription plans for the current user's client.

Returns the active plan (status: active/trialing) with full details. If the plan has a Stripe subscription, all Stripe subscription fields are included in the stripe_subscription field. If the plan doesn't have a Stripe subscription, this should be beacuse it's an Enterprise plan.

This is the new version of the plans endpoint. The /subscriptions/plan endpoint is kept for backward compatibility.

Returns: PlanFullResponse: Active plan with full details

get/api/v1/plans

Response

Successful Response

namestring required
product_idstring uuid nullable
client_idstring uuid required
amountnumber required
billing_cyclestring
statusstring nullable
starts_atstring date-time nullable
ends_atstring date-time nullable
configobject nullable
canceled_atstring date-time nullable
trial_endstring date-time nullable
stripe_subscription_idstring nullable
stripe_customer_idstring nullable

Stripe customer id (cus_...) for this plan/client

created_atstring date-time required
updated_atstring date-time required
created_bystring nullable
updated_bystring nullable
billing_emailstring email nullable
daily_token_limitnumber nullable

Configured daily token limit from plan

grace_period_started_atstring date-time nullable
failed_payment_retry_countinteger
is_suspendedboolean
suspended_atstring date-time nullable
sourcestring nullable

Where the plan record came from: 'database' or 'stripe'

stripe_cancel_atstring date-time nullable

Scheduled cancellation date from linked Stripe subscription

stripe_canceled_atstring date-time nullable

Actual cancellation date from linked Stripe subscription

stripe_subscriptionobject nullable

Full Stripe subscription details if the plan is linked to a Stripe subscription

stripe_customer_namestring nullable

Stripe customer name for the client

invoice_paymentboolean

True when the client is configured for invoice billing. Derived from client.payment_method == 'invoice'.