The plan object
| Attribute | Type | Description |
|---|---|---|
id | integer | Unique plan id. |
name | string | Display name (e.g. Starter). |
description | string | What the plan includes. |
isActive | boolean | Whether the plan can be subscribed to. |
type | string | SUBSCRIPTION (fixed price) or USAGE (metered). |
productId | integer | Product the plan belongs to. |
priceMonthly | number | Monthly price in fiat major units. |
creditRate | object | Per-metric credit rates, for USAGE plans. |
planQuotas | PlanQuota[] | Usage limits attached to the plan (see below). |
createdBy | string | Actor that created the plan. |
createdAt | string | ISO 8601 UTC timestamp. |
The plan quota object
| Attribute | Type | Description |
|---|---|---|
id | string | Unique quota id. |
planId | integer | Plan the quota belongs to. |
metric | string | Metered dimension (e.g. API_CALLS, PROJECTS, TOKEN_MINTS). |
limitValue | integer | null | Cap for the metric; null means unlimited. |
windowsSeconds | integer | null | Rolling window in seconds; null means no window. |
The subscription object
| Attribute | Type | Description |
|---|---|---|
id | string | Unique subscription id. |
projectId | string | Project that owns the subscription. |
businessId | string | Owning business. |
planId | integer | Subscribed plan. |
billingCycle | string | null | MONTHLY or YEARLY; null for usage plans. |
status | string | e.g. ACTIVE. |
subscriptionType | string | e.g. EXTERNAL. |
startDate | string | ISO 8601 UTC start. |
endDate | string | null | ISO 8601 UTC end, or null if open-ended. |
autoRenew | boolean | Whether the subscription renews automatically. |
creditAmount | number | null | Remaining credits, for usage plans. |
paymentRef | string | Reference of the payment that activated it. |
createdBy | string | Actor that created the subscription. |
createdAt | string | ISO 8601 UTC timestamp. |
updatedAt | string | ISO 8601 UTC timestamp. |
