Skip to content

GET /v1/organizations/{organizationId}/billing/payment-method

Reports whether the selected organization has a card on file, its documented payment-method metadata, whether a purchase needs a card first (purchaseRefusal), and how it pays: by card, or by invoice on its contract's terms (agreement). Reading this endpoint does not collect a new card or create a checkout session.

photon.organizations.billing.getOrganizationPaymentMethod(input: GetOrganizationPaymentMethodInput, options?: RequestOptions): Promise<GetOrganizationPaymentMethodOutput>
import { Photon } from "@photon-ai/api";

const photon = new Photon({
  headers: { Authorization: `Bearer ${process.env.PHOTON_API_TOKEN}` },
});
const result = await photon.organizations.billing.getOrganizationPaymentMethod({
  path: {
    organizationId: "organizationId",
  },
});
{
  "agreement": {
    "kind": "self_serve"
  },
  "cardOnFile": true,
  "paymentMethod": null,
  "purchaseRefusal": null
}

Parameters

Photon-VersionPhotonVersion

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

organizationIdstringrequired

Returns

200 Whether the organization has a captured card and its metadata. GetOrganizationPaymentMethodResponse

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

agreementBillingAgreementrequired

How the organization pays: self_serve by card, each purchase paid when made; enterprise by invoice on its contract's terms, its purchases added to its next monthly invoice.

cardOnFilebooleanrequired

True once a card is captured for the payer.

paymentMethodPaymentMethod | nullrequired

Metadata for the default card, or null.

purchaseRefusalPurchaseRefusal | nullrequired

Why the organization can't pay for a purchase now, or null when it can. payment_method_required: add a card first; an organization that pays by invoice never needs one. billing_not_ready: its billing is still being set up; try again shortly. Decide purchases on this, not on cardOnFile.

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.