Documentation menu

Get billing overview

GEThttps://api.instacloud.com/orgs/{orgId}/billing/overview

Token scope: account · org — read-only tokens allowed.

Billing overview for a window — totals, credits, forecast, per-dimension + per-project breakdown; applies due plan changes without accruing or charging usage

Parameters

NameInTypeRequiredDescription
fromqueryintegernounix seconds (default current cycle start)
toqueryintegernounix seconds (default current cycle end)
orgIdpathstringyes

Responses

200

Default Response

FieldTypeRequiredDescription
windowobjectno
window.fromintegerno
window.tointegerno
tier"free" | "pro" | "team" | "enterprise"no
pendingPlanChangeobject | nullno
pendingPlanChange.changeKind"upgrade" | "downgrade"no
pendingPlanChange.idstringyes
pendingPlanChange.fromTier"free" | "pro" | "team" | "enterprise"yes
pendingPlanChange.toTier"free" | "pro" | "team" | "enterprise"yes
pendingPlanChange.effectiveAtstringyesUTC effective timestamp: next-day upgrade or paid-period-end downgrade; the current tier remains effective until cutover. A Free → Pro/Team change cuts over locally once paid (status applied) — this stays the Stripe subscription start.
pendingPlanChange.status"awaiting_payment" | "scheduled"yes
pendingPlanChange.includedUsdnumberyesFull-cycle target allowance. An in-cycle paid upgrade adds only a proportional increase to the existing cycle.
billingStatus"active" | "suspended"no
subscriptionStatusstring | nullno
totalsobjectno
totals.usedUsdnumbernototal usage cost in the window
totals.includedUsdnumbernoincluded allowance saved for an exact snapshotted billing cycle; otherwise the configured current-tier allowance. Closed-cycle snapshots do not change when the org changes plan or configuration changes.
totals.overageUsdnumbernoamount still owed for the window: max(0, used − included − creditsApplied − (live window ? creditBalance : 0))
totals.creditsUsdnumbernoremaining usable included allowance plus the org credit balance (legacy merged figure; prefer creditBalanceUsd). Unused allowance from a closed snapshotted cycle is excluded.
totals.forecastUsdnumbernolinear run-rate projection to the full cycle
totals.creditBalanceUsdnumbernocredits the org holds as of now (every grant kind, unexpired, remaining > 0); not window-scoped; carries over between cycles
totals.creditsAppliedUsdnumbernocredits taken off this window's billing cycle so far (billing_cycles.credit_applied_micros); 0 when the window is not a billing cycle
byDimensionobject[]no
byDimension.dimension"ram" | "cpu" | "volume" | "storage" | "egress"no
byDimension.quantitynumberno
byDimension.unitstringno
byDimension.costUsdnumbernoquantity × unit price for this dimension in the window
byProjectobject[]no
byProject.projectIdstringno
byProject.namestringno
byProject.deletedAtstring | nullnowhen the project was deleted — its usage history outlives it; null for a live project
byProject.totalCostUsdnumberno
byProject.dimensionsobject[]no
byProject.dimensions.dimension"ram" | "cpu" | "volume" | "storage" | "egress"no
byProject.dimensions.quantitynumberno
byProject.dimensions.unitstringno
byProject.dimensions.costUsdnumbernoquantity × unit price for this dimension in the window

403

Default Response

FieldTypeRequiredDescription
errorstringyes

View as Markdown