Admin APIs
plans
Create Plan
Create a new plan.
Validates that there's no other active plan for the same client-product pair.
post/api/v1/admin/plans
Request body
namestring required
product_idstring uuid required
client_idstring uuid required
amountnumber required
billing_cyclestring
starts_atstring date-time nullable
ends_atstring date-time nullable
configobject nullable
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