BillingExtraSpend
Operations
Every route this entity exposes. Each route links to its own reference on this page.
| Method | Route | SDK operation | Returns |
|---|---|---|---|
PATCH |
/api/v1/organizations/{organization_id}/billing/extra_spend |
patch |
Updated billing page |
PUT |
/api/v1/organizations/{organization_id}/billing/extra_spend |
update |
Updated billing page |
Examples
One example per SDK, generated from the API model. The argument names are the parameters and fields of this entity, and the values are placeholders. The examples are not compiled or executed.
Golang
Construct client as shown in the Golang setup, then call the operations:
updated, err := client.BillingExtraSpend(nil).Update(map[string]any{"organization_id": "example", "enabled": true}, nil)
if err != nil {
panic(err)
}
fmt.Println(updated)
patched, err := client.BillingExtraSpend(nil).Patch(map[string]any{"organization_id": "example", "enabled": true}, nil)
if err != nil {
panic(err)
}
fmt.Println(patched)
Lua
Construct client as shown in the Lua setup, then call the operations:
local updated, err = client:BillingExtraSpend():update({ organization_id = "example", enabled = true })
local patched, err = client:BillingExtraSpend():patch({ organization_id = "example", enabled = true })
PHP
Construct client as shown in the PHP setup, then call the operations:
$updated = $client->BillingExtraSpend()->update(["organization_id" => "example", "enabled" => true]);
$patched = $client->BillingExtraSpend()->patch(["organization_id" => "example", "enabled" => true]);
Python
Construct client as shown in the Python setup, then call the operations:
updated = client.BillingExtraSpend().update({"organization_id": "example", "enabled": True})
patched = client.BillingExtraSpend().patch({"organization_id": "example", "enabled": True})
Ruby
Construct client as shown in the Ruby setup, then call the operations:
updated = client.BillingExtraSpend.update({ "organization_id" => "example", "enabled" => true })
patched = client.BillingExtraSpend.patch({ "organization_id" => "example", "enabled" => true })
TypeScript
Construct client as shown in the TypeScript setup, then call the operations:
const updated = await client.BillingExtraSpend().update({ organization_id: "example", enabled: true })
const patched = await client.BillingExtraSpend().patch({ organization_id: "example", enabled: true })
Fields
| Field | Type | Required | Description |
|---|---|---|---|
addons |
array |
Yes | Addons |
breakdown |
any |
Yes | The 24-hour live series with its provenance; null only when the rollup fallback itself failed. |
budget |
any |
Yes | Budget |
can_manage_contact |
boolean |
Yes | Can Manage Contact |
can_manage_extra_spend |
boolean |
Yes | Can Manage Extra Spend |
can_manage_local_subscription |
boolean |
Yes | Can Manage Local Subscription |
can_manage_payment_method |
boolean |
Yes | Can Manage Payment Method |
can_set_up_billing |
boolean |
Yes | Can Set Up Billing |
customer |
any |
Yes | Customer |
deployment_usage_visible |
boolean |
Yes | Deployment Usage Visible |
enabled |
boolean |
Yes | Enabled |
entitlements |
object |
Yes | Entitlements |
extra_spend_enabled |
boolean |
Yes | Organization consent to paid overages across all metered usage. |
feature_enabled |
boolean |
Yes | Whether the billing feature is on for this organization. |
monthly_cap_cents |
one,integer,null |
No | Monthly limit across all metered overages, excluding plan fees. |
organization_id |
string |
Yes | Organization Id |
package |
any |
Yes | Package |
prepaid |
any |
Yes | Prepaid |
preview |
any |
Yes | Metronome draft invoice and credits, or null. |
storage_usage |
object |
Yes | Storage Usage |
stripe |
object |
Yes | Stripe |
subscription |
any |
Yes | Subscription |
token_account |
object |
Yes | Token Account |
patch
PATCH /api/v1/organizations/{organization_id}/billing/extra_spend
Operation ID: api_v1_organization_billing_extra_spend.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
enabled |
boolean |
Yes | |
monthly_cap_cents |
integer,null |
No | Monthly limit across all metered overages, excluding plan fees. Null removes the limit; omission preserves it. |
Responses
200: Updated billing page
application/json
| Property | Type | Required | Description |
|---|---|---|---|
addons |
array of object |
Yes | |
addons[].addon_key |
string |
Yes | |
addons[].monthly_price_cents |
integer,null |
No | |
addons[].name |
string,null |
No | |
addons[].quantity |
integer |
Yes | |
breakdown |
object or null |
Yes | The 24-hour live series with its provenance; null only when the rollup fallback itself failed. |
budget |
object or null |
Yes | |
can_manage_contact |
boolean |
Yes | |
can_manage_extra_spend |
boolean |
Yes | |
can_manage_local_subscription |
boolean |
Yes | |
can_manage_payment_method |
boolean |
Yes | |
can_set_up_billing |
boolean |
Yes | |
customer |
object or null |
Yes | |
deployment_usage_visible |
boolean |
Yes | |
entitlements |
object |
Yes | |
entitlements.ci_overage_cents |
integer |
No | Net overage from the shared CI dollar pool; zero without a CI dollar allowance. Omitted by older API releases. |
entitlements.ci_projected_overage_cents |
integer |
No | Forecast net overage from the shared CI dollar pool. Omitted by older API releases. |
entitlements.ci_raw_used |
number |
Yes | Full-period CI usage with the shared standard pool counted once. |
entitlements.ci_spend_cents |
integer |
No | Total CI spend before the monthly USD credit in cents, including runner, cache, storage and add-on charges. Omitted by older API releases. |
entitlements.ci_uncapped |
boolean |
No | CI runner usage has no minute cap under the current package and extra-spend setting. Omitted by older API releases. |
entitlements.enforcing |
boolean |
Yes | |
entitlements.meters |
array of object |
Yes | |
entitlements.meters[].allowance_pool |
enum: ci_spend, null |
No | Shared dollar allowance covering this meter. Omitted by older API releases. |
entitlements.meters[].cap |
number,null |
No | The quantity past which new usage is refused; null means unlimited. |
entitlements.meters[].dimension_value |
string,null |
No | |
entitlements.meters[].hard_cap |
number,null |
No | |
entitlements.meters[].included |
number |
Yes | |
entitlements.meters[].meter_key |
string |
Yes | |
entitlements.meters[].pay_as_you_go |
boolean |
Yes | |
entitlements.meters[].projected_overage_cents |
integer |
Yes | Forecast overage for the current allowance window. |
entitlements.meters[].raw_used |
number |
Yes | Full billing-period usage before allowance resets. |
entitlements.meters[].remaining |
number |
Yes | |
entitlements.meters[].spend_cents |
integer |
Yes | What this period's overage costs so far at the unit price. The standard CI runner classes split their shared pool's overage by each class's own minutes. |
entitlements.meters[].unit |
string |
Yes | |
entitlements.meters[].unit_price_nanodollars |
integer |
Yes | |
entitlements.meters[].used |
number |
Yes | |
entitlements.period_spend_cents |
integer |
Yes | Overage spend so far this period across every meter |
entitlements.period_started_at |
string |
Yes | |
entitlements.recurring_price_cents |
integer |
Yes | |
entitlements.roder_daily_run_limit |
integer |
Yes | |
entitlements.roder_run_concurrency_limit |
integer |
Yes | |
entitlements.seat_limit |
integer,null |
No | |
entitlements.seats |
integer |
Yes | |
entitlements.seats_remaining |
integer,null |
No | |
entitlements.state |
enum: none, trialing, active, past_due, suspended, exempt |
Yes | |
entitlements.usage_reset_at |
string,null (date-time) |
Yes | |
extra_spend_enabled |
boolean |
Yes | Organization consent to paid overages across all metered usage. |
feature_enabled |
boolean |
Yes | Whether the billing feature is on for this organization. False renders the page as not enabled, with no Subscribe action. |
organization_id |
string |
Yes | |
package |
object or null |
Yes | |
prepaid |
object or null |
Yes | |
preview |
object or null |
Yes | Metronome draft invoice and credits, or null. |
storage_usage |
object |
Yes | |
storage_usage.as_of |
string (date-time) |
Yes | |
storage_usage.categories |
array of object |
Yes | |
storage_usage.categories[].allowance |
object or null |
Yes | |
storage_usage.categories[].current_bytes |
integer |
Yes | |
storage_usage.categories[].measurement |
enum: stored, sampled, provisioned |
Yes | |
storage_usage.categories[].meter_key |
string |
Yes | |
storage_usage.categories[].sampled_at |
string (date-time) |
Yes | |
storage_usage.categories[].unmeasured_count |
integer |
Yes | |
storage_usage.incomplete |
boolean |
Yes | |
storage_usage.provisioned_bytes |
integer |
Yes | |
storage_usage.stored_bytes |
integer |
Yes | |
stripe |
object |
Yes | |
stripe.configured |
boolean |
Yes | |
subscription |
object or null |
Yes | |
token_account |
object |
Yes | |
token_account.available_usd |
string |
Yes | |
token_account.balance_usd |
string |
Yes | |
token_account.reserved_usd |
string |
Yes | |
token_account.top_up_cents |
array of enum: 1000, 2500, 5000, 10000 |
Yes |
401: Unauthorized
403: Forbidden
404: Not found
422: Unprocessable entity
502: Bad gateway
update
PUT /api/v1/organizations/{organization_id}/billing/extra_spend
Operation ID: put_api_v1_organizations_organization_id_billing_extra_spend.
Authentication: bearer token (bearerAuth).
Parameters
| Parameter | In | Type | Required | Description |
|---|---|---|---|---|
organization_id |
path |
string |
Yes |
Request body
application/json
| Property | Type | Required | Description |
|---|---|---|---|
enabled |
boolean |
Yes | |
monthly_cap_cents |
integer,null |
No | Monthly limit across all metered overages, excluding plan fees. Null removes the limit; omission preserves it. |
Responses
200: Updated billing page
application/json
| Property | Type | Required | Description |
|---|---|---|---|
addons |
array of object |
Yes | |
addons[].addon_key |
string |
Yes | |
addons[].monthly_price_cents |
integer,null |
No | |
addons[].name |
string,null |
No | |
addons[].quantity |
integer |
Yes | |
breakdown |
object or null |
Yes | The 24-hour live series with its provenance; null only when the rollup fallback itself failed. |
budget |
object or null |
Yes | |
can_manage_contact |
boolean |
Yes | |
can_manage_extra_spend |
boolean |
Yes | |
can_manage_local_subscription |
boolean |
Yes | |
can_manage_payment_method |
boolean |
Yes | |
can_set_up_billing |
boolean |
Yes | |
customer |
object or null |
Yes | |
deployment_usage_visible |
boolean |
Yes | |
entitlements |
object |
Yes | |
entitlements.ci_overage_cents |
integer |
No | Net overage from the shared CI dollar pool; zero without a CI dollar allowance. Omitted by older API releases. |
entitlements.ci_projected_overage_cents |
integer |
No | Forecast net overage from the shared CI dollar pool. Omitted by older API releases. |
entitlements.ci_raw_used |
number |
Yes | Full-period CI usage with the shared standard pool counted once. |
entitlements.ci_spend_cents |
integer |
No | Total CI spend before the monthly USD credit in cents, including runner, cache, storage and add-on charges. Omitted by older API releases. |
entitlements.ci_uncapped |
boolean |
No | CI runner usage has no minute cap under the current package and extra-spend setting. Omitted by older API releases. |
entitlements.enforcing |
boolean |
Yes | |
entitlements.meters |
array of object |
Yes | |
entitlements.meters[].allowance_pool |
enum: ci_spend, null |
No | Shared dollar allowance covering this meter. Omitted by older API releases. |
entitlements.meters[].cap |
number,null |
No | The quantity past which new usage is refused; null means unlimited. |
entitlements.meters[].dimension_value |
string,null |
No | |
entitlements.meters[].hard_cap |
number,null |
No | |
entitlements.meters[].included |
number |
Yes | |
entitlements.meters[].meter_key |
string |
Yes | |
entitlements.meters[].pay_as_you_go |
boolean |
Yes | |
entitlements.meters[].projected_overage_cents |
integer |
Yes | Forecast overage for the current allowance window. |
entitlements.meters[].raw_used |
number |
Yes | Full billing-period usage before allowance resets. |
entitlements.meters[].remaining |
number |
Yes | |
entitlements.meters[].spend_cents |
integer |
Yes | What this period's overage costs so far at the unit price. The standard CI runner classes split their shared pool's overage by each class's own minutes. |
entitlements.meters[].unit |
string |
Yes | |
entitlements.meters[].unit_price_nanodollars |
integer |
Yes | |
entitlements.meters[].used |
number |
Yes | |
entitlements.period_spend_cents |
integer |
Yes | Overage spend so far this period across every meter |
entitlements.period_started_at |
string |
Yes | |
entitlements.recurring_price_cents |
integer |
Yes | |
entitlements.roder_daily_run_limit |
integer |
Yes | |
entitlements.roder_run_concurrency_limit |
integer |
Yes | |
entitlements.seat_limit |
integer,null |
No | |
entitlements.seats |
integer |
Yes | |
entitlements.seats_remaining |
integer,null |
No | |
entitlements.state |
enum: none, trialing, active, past_due, suspended, exempt |
Yes | |
entitlements.usage_reset_at |
string,null (date-time) |
Yes | |
extra_spend_enabled |
boolean |
Yes | Organization consent to paid overages across all metered usage. |
feature_enabled |
boolean |
Yes | Whether the billing feature is on for this organization. False renders the page as not enabled, with no Subscribe action. |
organization_id |
string |
Yes | |
package |
object or null |
Yes | |
prepaid |
object or null |
Yes | |
preview |
object or null |
Yes | Metronome draft invoice and credits, or null. |
storage_usage |
object |
Yes | |
storage_usage.as_of |
string (date-time) |
Yes | |
storage_usage.categories |
array of object |
Yes | |
storage_usage.categories[].allowance |
object or null |
Yes | |
storage_usage.categories[].current_bytes |
integer |
Yes | |
storage_usage.categories[].measurement |
enum: stored, sampled, provisioned |
Yes | |
storage_usage.categories[].meter_key |
string |
Yes | |
storage_usage.categories[].sampled_at |
string (date-time) |
Yes | |
storage_usage.categories[].unmeasured_count |
integer |
Yes | |
storage_usage.incomplete |
boolean |
Yes | |
storage_usage.provisioned_bytes |
integer |
Yes | |
storage_usage.stored_bytes |
integer |
Yes | |
stripe |
object |
Yes | |
stripe.configured |
boolean |
Yes | |
subscription |
object or null |
Yes | |
token_account |
object |
Yes | |
token_account.available_usd |
string |
Yes | |
token_account.balance_usd |
string |
Yes | |
token_account.reserved_usd |
string |
Yes | |
token_account.top_up_cents |
array of enum: 1000, 2500, 5000, 10000 |
Yes |