Get the project's effective billing terms
Get the project's effective billing terms: getEffectiveTerms in the TypeScript, Python, Rust and Go clients.
GET /v1/organizations/{organizationId}/billing/projects/{projectId}/terms
Returns what the selected project is billed on now, per category it holds: the plan as its subscription has it, with any override applied, each fixed charge at the subscription's price and quantity, and resolved entitlements; where the plan comes from; how invoices are paid; the current period and next billing date; and any downgrade or cancellation waiting for the period end. Supply both organizationId and projectId; the organization must pay for the project. This operation does not change billing.
photon.organizations.billing.getEffectiveTerms(input: GetEffectiveTermsInput, options?: RequestOptions): Promise<GetEffectiveTermsOutput>photon.organizations.billing.get_effective_terms(input: GetEffectiveTermsInput, *, options: RequestOptions | None = None) -> models.GetEffectiveTermsResponseclient.get_effective_terms(organization_id: String, project_id: String).await -> Result<ResponseValue<types::GetEffectiveTermsResponse>, Error<GetEffectiveTermsError>>client.Organizations.Billing.GetEffectiveTerms(ctx context.Context, params *GetEffectiveTermsParams, opts ...RequestOption) (*GetEffectiveTermsResponse, error)import { Photon } from "@photon-ai/api";
const photon = new Photon({
headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.organizations.billing.getEffectiveTerms({
path: {
organizationId: "organizationId",
projectId: "projectId",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import GetEffectiveTermsInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.organizations.billing.get_effective_terms(
GetEffectiveTermsInput.model_validate({
"path": {
"organizationId": "organizationId",
"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
.get_effective_terms("organizationId".to_owned(), "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.Organizations.Billing.GetEffectiveTerms(ctx, &photonapi.GetEffectiveTermsParams{
OrganizationID: "organizationId",
ProjectID: "projectId",
})
if err != nil {
return err
}
_ = result{
"subscriptions": [
{
"cancelsAt": null,
"category": "string",
"coupons": [
{
"amountCents": null,
"appliesTo": null,
"couponCode": "string",
"currency": null,
"duration": "once",
"endsAt": null,
"name": "string",
"organizationWide": true,
"promotionCode": null,
"rate": null
}
],
"currentPeriodEnd": "string",
"currentPeriodStart": "string",
"nextBillingAt": "string",
"paymentMode": "automatic",
"plan": {
"baseAmountCents": 0,
"categoryDisplayName": null,
"currency": "string",
"description": null,
"entitlements": [
{}
],
"fixedCharges": [
{}
],
"interval": "weekly",
"isDefault": true,
"minimumCommitment": null,
"name": "string",
"payInAdvance": true,
"planCode": "string",
"tier": null,
"tierDisplayName": null,
"usageCharges": [
{}
],
"usageThresholds": [
{}
]
},
"planSource": "catalog",
"scheduledPlanChange": null
}
],
"timeZone": "string"
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
The project being billed.
Returns
200 The project's effective billing terms, per category. GetEffectiveTermsResponse
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
One entry per category the project holds, by category. Empty means it holds none.
The IANA time zone the payer is billed in, e.g. America/Los_Angeles. Billing periods start and end at its midnights, so read their calendar dates in it.
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.