> ## Documentation Index
> Fetch the complete documentation index at: https://docs.photon.codes/docs/llms.txt
> Use this file to discover all available pages before exploring further.

> ## Agent Instructions
> Use Stable documentation by default. Honor an explicit Beta request or a URL under /docs/beta/. If the requested version conflicts with the installed CLI package or API origin, clarify the target before writing integration code.
> Pages under /docs/beta/ document Beta; other product pages document Stable. Keep the CLI package, commands, API origin, and credentials within the selected version. State the documentation version in your answer.
> For MCP search, always pass version: Stable or version: Beta. Unfiltered search mixes both versions. For filesystem reads, keep Beta queries under /beta/ and exclude /beta/ from Stable queries; discover paths before reading them.
> The public docs base is https://photon.codes/docs. Convert MCP page paths to public URLs under that base, preserving /beta/ when present. Read https://photon.codes/docs/skill.md for version selection and https://photon.codes/docs/llms.txt for the version indexes.

# Billing

> The Billing resource in the TypeScript, Python and Rust clients.

## Methods

<Tabs>
  <Tab title="TypeScript">
    **[List billing plans](/docs/beta/api-client/sdk/projects/billing/list-billing-plans)**

    ```typescript TypeScript theme={null}
    photon.projects.billing.listBillingPlans(input: ListBillingPlansInput, options?: RequestOptions): Promise<ListBillingPlansOutput>
    ```

    `GET /v1/projects/{projectId}/billing/plans`

    **[Get billing operation](/docs/beta/api-client/sdk/projects/billing/get-operation)**

    ```typescript TypeScript theme={null}
    photon.projects.billing.getOperation(input: GetBillingOperationInput, options?: RequestOptions): Promise<GetBillingOperationOutput>
    ```

    `GET /v1/projects/{projectId}/billing/operations/{operationId}`

    **[Get project billing overview](/docs/beta/api-client/sdk/projects/billing/get-overview)**

    ```typescript TypeScript theme={null}
    photon.projects.billing.getOverview(input: GetBillingOverviewInput, options?: RequestOptions): Promise<GetBillingOverviewOutput>
    ```

    `GET /v1/projects/{projectId}/billing`
  </Tab>

  <Tab title="Python">
    **[List billing plans](/docs/beta/api-client/sdk/projects/billing/list-billing-plans)**

    ```python Python theme={null}
    photon.projects.billing.list_billing_plans(input: ListBillingPlansInput) -> models.ListBillingPlansResponse
    ```

    `GET /v1/projects/{projectId}/billing/plans`

    **[Get billing operation](/docs/beta/api-client/sdk/projects/billing/get-operation)**

    ```python Python theme={null}
    photon.projects.billing.get_operation(input: GetBillingOperationInput) -> models.BillingOperation
    ```

    `GET /v1/projects/{projectId}/billing/operations/{operationId}`

    **[Get project billing overview](/docs/beta/api-client/sdk/projects/billing/get-overview)**

    ```python Python theme={null}
    photon.projects.billing.get_overview(input: GetBillingOverviewInput) -> models.GetBillingOverviewResponse
    ```

    `GET /v1/projects/{projectId}/billing`
  </Tab>

  <Tab title="Rust">
    **[List billing plans](/docs/beta/api-client/sdk/projects/billing/list-billing-plans)**

    ```rust Rust theme={null}
    client.list_billing_plans(project_id: String).await -> Result<ResponseValue<types::ListBillingPlansResponse>, Error<ListBillingPlansError>>
    ```

    `GET /v1/projects/{projectId}/billing/plans`

    **[Get billing operation](/docs/beta/api-client/sdk/projects/billing/get-operation)**

    ```rust Rust theme={null}
    client.get_billing_operation(project_id: String, operation_id: String).await -> Result<ResponseValue<types::BillingOperation>, Error<GetBillingOperationError>>
    ```

    `GET /v1/projects/{projectId}/billing/operations/{operationId}`

    **[Get project billing overview](/docs/beta/api-client/sdk/projects/billing/get-overview)**

    ```rust Rust theme={null}
    client.get_billing_overview(project_id: String).await -> Result<ResponseValue<types::GetBillingOverviewResponse>, Error<GetBillingOverviewError>>
    ```

    `GET /v1/projects/{projectId}/billing`
  </Tab>
</Tabs>

## Models

### ListBillingPlansResponse

<ResponseField name="plans" type={"object"} required>
  Plans grouped by valid metadata type and explicitly published with visible="true". Each group is in display order: by tier, plans without one last, then by planCode.
</ResponseField>

### BillingOperation

Authoritative provisioning state. Poll the operation route while pending.

**One of: PendingBillingOperation**

<ResponseField name="failure" type={"null"} required />

<ResponseField name="kind" type={"BillingOperationKind"} required />

<ResponseField name="operationId" type={"string"} required>
  Stable handle for this provisioning action.
</ResponseField>

<ResponseField name="resolvedAt" type={"null"} required />

<ResponseField name="result" type={"null"} required />

<ResponseField name="status" type={"\"pending\""} required>
  Accepted and still executing. Poll the operation route.
</ResponseField>

<ResponseField name="submittedAt" type={"string | null"} required />

**One of: SucceededBillingOperation**

<ResponseField name="failure" type={"null"} required />

<ResponseField name="kind" type={"BillingOperationKind"} required />

<ResponseField name="operationId" type={"string"} required>
  Stable handle for this provisioning action.
</ResponseField>

<ResponseField name="resolvedAt" type={"string | null"} required />

<ResponseField name="result" type={"BillingOperationResult"} required />

<ResponseField name="status" type={"\"succeeded\""} required>
  Terminal. The result is authoritative.
</ResponseField>

<ResponseField name="submittedAt" type={"string | null"} required />

**One of: FailedBillingOperation**

<ResponseField name="failure" type={"BillingOperationFailure"} required />

<ResponseField name="kind" type={"BillingOperationKind"} required />

<ResponseField name="operationId" type={"string"} required>
  Stable handle for this provisioning action.
</ResponseField>

<ResponseField name="resolvedAt" type={"string | null"} required />

<ResponseField name="result" type={"null"} required />

<ResponseField name="status" type={"\"failed\""} required>
  Terminal. Failure contains a stable code and retryability.
</ResponseField>

<ResponseField name="submittedAt" type={"string | null"} required />

### GetBillingOverviewResponse

<ResponseField name="entitlementsVersion" type={"integer"} required>
  Bumps on every entitlement change in any category.
</ResponseField>

<ResponseField name="subscriptions" type={"array of ProjectSubscription"} required>
  One entry per category that currently holds a subscription. Empty means none do — cancelled, or never opened.
</ResponseField>

<ResponseField name="usage" type={"array of MeteredUsage"} required>
  Current-period metered usage, priced.
</ResponseField>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.