v4

latestOpenAPI 3.1.02026-08-03427198448.4 KB

Get Billing Entitlement

Fetch internal per-org entitlement state for billing/paywall decisions.

The optional plan_slug query param is sent by the frontend (derived from Clerk's has({ plan })). When it differs from the stored plan_slug we trigger an immediate Clerk sync so credit limits update without waiting for the nightly job.

get/api/billing/entitlement

Query parameters

plan_slugstring nullable
freshboolean
user_idstring
org_idstring

Response

Successful Response

user_idstring required
org_idstring required
subscription_statusstring required
is_paid_orgboolean required
is_paying_orgboolean required
low_balance_threshold_usdnumber
auto_recharge_enabledboolean
auto_recharge_amount_usdnumber
monthly_credit_limitinteger required
monthly_credits_usedinteger required
monthly_credits_remaininginteger required
monthly_credits_exhaustedboolean required
monthly_period_startstring nullable
monthly_period_endstring nullable
monthly_exhausted_atstring nullable
extra_credit_balanceinteger
total_available_creditsinteger
ai_usage_allowedboolean
minimum_required_creditsinteger
free_trial_creditsinteger
requires_billing_paywallboolean required
paywall_reasonstring nullable
credits_reset_atstring nullable
billing_pathstring nullable
has_payment_methodboolean
plan_slugstring nullable
plan_namestring nullable
server_timestring nullable