List billing plans
List billing plans: listBillingPlans in the TypeScript, Python, Rust and Go clients.
GET /v1/projects/{projectId}/billing/plans
Lists the billing plan catalog, grouped by their public plan-metadata type. Use the returned plan information when choosing the category and planCode for a plan change. The catalog is the same for every project, and reading it does not purchase a plan.
photon.projects.billing.listBillingPlans(input: ListBillingPlansInput, options?: RequestOptions): Promise<ListBillingPlansOutput>photon.projects.billing.list_billing_plans(input: ListBillingPlansInput, *, options: RequestOptions | None = None) -> models.ListBillingPlansResponseclient.list_billing_plans(project_id: String).await -> Result<ResponseValue<types::ListBillingPlansResponse>, Error<ListBillingPlansError>>client.Projects.Billing.ListBillingPlans(ctx context.Context, params *ListBillingPlansParams, opts ...RequestOption) (*ListBillingPlansResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.projects.billing.listBillingPlans({
path: {
projectId: "projectId",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListBillingPlansInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.projects.billing.list_billing_plans(
ListBillingPlansInput.model_validate({
"path": {
"projectId": "projectId",
},
})
)use photon_ai_api::{Credential, PhotonClientBuilder, SecretString};
let token = std::env::var("PHOTON_API_TOKEN")?;
let client = PhotonClientBuilder::new()
.credential("accountServiceKey", Credential::Bearer(SecretString::from(token)))
.build()?;
let result = client
.list_billing_plans("projectId".to_owned())
.await
.map_err(|error| format!("{error:?}"))?
.into_inner();import (
"context"
"os"
photonapi "github.com/photon-hq/api/packages/go"
)
ctx := context.Background()
client := photonapi.NewClient(photonapi.WithAPIKey(os.Getenv("PHOTON_API_TOKEN")))
result, err := client.Projects.Billing.ListBillingPlans(ctx, &photonapi.ListBillingPlansParams{
ProjectID: "projectId",
})
if err != nil {
return err
}
_ = result{
"plans": {}
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
The project being billed.
Returns
200 Billing plans grouped by their public plan-metadata type. ListBillingPlansResponse
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
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.
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.