List invoices
List invoices: listInvoices in the TypeScript, Python, Rust and Go clients.
GET /v1/organizations/{organizationId}/billing/invoices
Returns one page of the selected organization's invoices, newest first: every invoice issued to it with a nonzero total or actual charges, including charges fully paid by credit; drafts and empty invoices are excluded. Each names what it charged the organization's own subscription and each project. Pass subject to list only the invoices that charge the organization itself or one of its projects, and nextCursor as cursor to read further. Listing invoices does not make a payment or modify a subscription.
photon.organizations.billing.listInvoices(input: ListInvoicesInput, options?: RequestOptions): Promise<ListInvoicesOutput>photon.organizations.billing.list_invoices(input: ListInvoicesInput, *, options: RequestOptions | None = None) -> models.ListInvoicesResponseclient.list_invoices(organization_id: String, params: Option<ListInvoicesParams>).await -> Result<ResponseValue<types::ListInvoicesResponse>, Error<ListInvoicesError>>client.Organizations.Billing.ListInvoices(ctx context.Context, params *ListInvoicesParams, opts ...RequestOption) (*ListInvoicesResponse, 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.listInvoices({
path: {
organizationId: "organizationId",
},
});import os
from photon_api import Photon
from photon_api.rpc_generated import ListInvoicesInput
photon = Photon(headers={"Authorization": f"Bearer {os.environ['PHOTON_API_TOKEN']}"})
result = photon.organizations.billing.list_invoices(
ListInvoicesInput.model_validate({
"path": {
"organizationId": "organizationId",
},
})
)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_invoices("organizationId".to_owned(), None)
.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.ListInvoices(ctx, &photonapi.ListInvoicesParams{
OrganizationID: "organizationId",
})
if err != nil {
return err
}
_ = result{
"invoices": [
{
"amountDueCents": -9007199254740991,
"currency": "string",
"invoiceId": "string",
"issuedAt": null,
"kind": "subscription",
"number": "string",
"pageUrl": null,
"paymentActionRequired": true,
"paymentDueAt": null,
"paymentOverdue": true,
"paymentProcessing": true,
"paymentStatus": "pending",
"pdfUrl": null,
"status": "draft",
"subjects": [
{
"projectId": "string",
"type": "project"
}
],
"totalCents": -9007199254740991
}
],
"nextCursor": null
}Parameters
Selects the API contract date. Without it, the request is served as 2026-07-01.
nextCursor of the page before; omitted for the first page.
At most this many invoices, 1 to 100. 20 when omitted.
Only the invoices that charge this subject a nonzero amount: organization for the organization's own charges, such as SSO and 10DLC, or one of its projects by id. Omitted, every invoice.
Returns
200 One page of the organization's invoices, newest first, excluding drafts and empty invoices; includes charges fully paid by credit. ListInvoicesResponse
Headers: ETag, Photon-Version. The raw response carries these headers; see Raw responses.
Pass as cursor to read the next page. Null on the last page.
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.