Account

Get Billing

Headroom for metered work: what the account can still spend, what is held by builds and runs in flight, and what one run or build holds.

Every build and run is metered in cents. The figures here are the ones admission uses, so remaining_cents below projected_run_cents means the next run is refused with 402. A 402 is final for this request; no work starts. usage_help_url explains the account limitation. Projected holds are estimates, not final charges. This read may initialize the account's billing record and signup grant.

get/v1/account/billing

Request

  • Base URL: https://api.ensemble.markets (the document declares no server; this is the origin it was published from)
  • URL: https://api.ensemble.markets/v1/account/billing
  • Auth: HTTP bearer

Response

Successful Response

planstring required

Billing plan: starter | hobby | business

phase'credits' | 'metered' | 'unfunded' | 'unavailable' required

credits: local credits cover new work, previously accrued metered usage remains owed; metered: credits are spent, usage bills against the spending cap; unfunded: credits are spent and there is no active subscription (every metered request is refused); unavailable: the decision needs Stripe and Stripe could not be reached.

remaining_centsinteger required

Headroom for new work: credits plus verified metered headroom (cap minus accrued usage), minus outstanding holds. Unverified metered funds are excluded. A request is refused when its projected cost exceeds this.

held_centsinteger required

Projected cost of builds and runs currently in flight

credits_remaining_centsinteger required

Local credits left: monthly included, signup grant and promo

spending_cap_centsinteger required

Metered spend allowed per billing period (dashboard setting)

period_usage_centsinteger nullable

Metered liability incurred this billing period, including queued Stripe delivery. Adding credits never reduces this amount. Null when the billing period could not be verified.

projected_run_centsinteger required

What one run of a stored script holds at admission

projected_build_centsinteger required

What one build or rebuild on the default agent tier holds at admission

has_payment_methodboolean required

A Stripe customer exists for the account

has_subscriptionboolean nullable

Active subscription: true or false when verified, null when unavailable

current_period_startstring date-time nullable
current_period_endstring date-time nullable
signup_credits_expire_atstring date-time nullable

When the unspent signup grant lapses

usage_help_urlstring required

Informational help for usage, holds and account limitations

dashboard_urlstring required

Deprecated alias of usage_help_url (informational help)

Changes

No recorded changes to this operation across all 1 revision of this API.