Skip to content
Docs

Billing

Get Organization Billing Summary
client.Organizations.Billing.Summary(ctx, organizationID) (*OrganizationBillingSummary, error)
GET/v1/organizations/{organization_id}/billing/summary
Get Organization Daily Cost
client.Organizations.Billing.Cost(ctx, organizationID, query) (*OrganizationDailyCost, error)
GET/v1/organizations/{organization_id}/billing/cost
List Organization Billing History
client.Organizations.Billing.History(ctx, organizationID, query) (*BillingHistoryEntryList, error)
GET/v1/organizations/{organization_id}/billing/history
Top Up Organization Prepaid Balance
client.Organizations.Billing.TopUp(ctx, organizationID, params) (*OrganizationBillingSummary, error)
POST/v1/organizations/{organization_id}/billing/topup
ModelsExpand Collapse
type BillingHistoryEntry struct{…}

A single billing history line item: a prepaid credit or a manual adjustment.

ID string

Unique identifier for the entry.

Amount string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
CreatedAt Time

When the entry was recorded.

formatdate-time
Currency string

ISO 4217 currency code.

Kind of entry.

One of the following:
const BillingHistoryEntryTypeGrant BillingHistoryEntryType = "grant"
const BillingHistoryEntryTypeAdjustment BillingHistoryEntryType = "adjustment"
Description stringOptional

Human-readable note describing the entry, when available.

type BillingHistoryEntryList struct{…}
ID string

Unique identifier for the entry.

Amount string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
CreatedAt Time

When the entry was recorded.

formatdate-time
Currency string

ISO 4217 currency code.

Kind of entry.

One of the following:
const BillingHistoryEntryTypeGrant BillingHistoryEntryType = "grant"
const BillingHistoryEntryTypeAdjustment BillingHistoryEntryType = "adjustment"
Description stringOptional

Human-readable note describing the entry, when available.

type BillingHistoryEntryType string

Kind of entry.

One of the following:
const BillingHistoryEntryTypeGrant BillingHistoryEntryType = "grant"
const BillingHistoryEntryTypeAdjustment BillingHistoryEntryType = "adjustment"
type DailyCostPoint struct{…}

Total usage cost for a single UTC day.

Cost string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
Date string

UTC calendar day (YYYY-MM-DD).

type OrganizationDailyCost struct{…}

Daily usage cost over a date range: one entry per UTC day (zero on idle days), summing open and closed resources. Suitable for a daily cost bar chart.

Currency string

ISO 4217 currency code.

One entry per UTC day in the range, oldest first.

Cost string

Arbitrary-precision decimal serialized as a string (e.g. “58.40”).

formatdecimal
Date string

UTC calendar day (YYYY-MM-DD).

From string

Inclusive start of the range, as a UTC calendar day (YYYY-MM-DD).

To string

Inclusive end of the range, as a UTC calendar day (YYYY-MM-DD).