Skip to content

GET /v1/projects/{projectId}/billing

Returns the selected project's plan information, entitlements and current billing-period usage. This operation reads project billing state; it does not change plans or the payer's payment method. Organization-level plans are available through the organization billing overview.

photon.projects.billing.getOverview(input: GetBillingOverviewInput, options?: RequestOptions): Promise<GetBillingOverviewOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.billing.getOverview({
  path: {
    projectId: "projectId",
  },
});
{
  "entitlementsVersion": 0,
  "subscriptions": [
    {
      "baseAmountCents": 0,
      "cancelsAt": null,
      "category": "string",
      "categoryDisplayName": null,
      "currency": "string",
      "currentPeriodEnd": null,
      "entitlements": [
        {
          "featureKey": "string",
          "value": "string"
        }
      ],
      "fixedCharges": [
        {
          "chargeModel": "graduated",
          "displayName": "string",
          "fixedChargeCode": "string",
          "payInAdvance": true,
          "pricing": {},
          "prorated": true,
          "quantity": 0
        }
      ],
      "minimumCommitment": null,
      "planCode": "string",
      "planName": "string",
      "status": "active",
      "tierDisplayName": null
    }
  ],
  "usage": [
    {
      "amountCents": -9007199254740991,
      "category": "string",
      "categoryDisplayName": null,
      "currency": "string",
      "displayName": "string",
      "metricCode": "string",
      "units": -9007199254740991
    }
  ]
}

Parameters

Photon-VersionPhotonVersion

Selects the API contract date. Without it, the request is served as 2026-07-01.

projectIdstringrequired

The project being billed.

Returns

200 Plan, entitlements, and current-period usage. GetBillingOverviewResponse

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.

entitlementsVersionintegerrequired

Bumps on every entitlement change in any category.

subscriptionsarray of ProjectSubscriptionrequired

One entry per category that currently holds a subscription. Empty means none do — cancelled, or never opened.

usagearray of MeteredUsagerequired

Current-period metered usage, priced.

304 Not Modified. Sent only when If-None-Match matches the ETag of an earlier 200 response for the same representation; no body. No body.

Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.