internal
workspaces

Convert Workspace To Paid

Put an existing workspace onto a paid plan (audited).

The workspace's type is deliberately never touched; the account's plan alone is what makes it paid, and a workspace that holds the free plan's account is converted in place. origin is untouched for the same reason and a stronger one — it is the acquisition fact, and converting a workspace does not change which door it came through.

The service reads the rate card itself, inside the transaction that opens the account, so the unpriced-usage refusal answers on the stored card rather than on one this handler chose. Until staff save once, that stored card is the shipped one. It reads the approved included allowance in the same place and for the same reason, so a request that names no amount grants what staff approved rather than what a client remembered.

post/api/v1/internal/workspaces/{workspace_id}/billing-account

Path parameters

workspace_idstring uuid required

Request body

anchor_dayinteger required

Response

Successful Response

workspace_idstring uuid required
plan_keystring required
plan_versionstring required
on_free_planboolean required
status'pending' | 'active' | 'past_due' | 'unpaid' | 'cancelled' required

Subscription state as MAIA understands it, not as Stripe reports it.

PAST_DUE is the retry window: full access with a visible warning. UNPAID is that window exhausted — paid work refuses until payment succeeds, but the subscription has not ended, so purchased usage is kept. CANCELLED is paid access ended. Purchased usage is kept there too — no status takes it — but only a status that keeps paid access may spend it.

anchor_dayinteger required
period_startstring date required
period_endstring date required
included_granted_usdstring required
included_consumed_usdstring required
purchased_balance_usdstring required
given_balance_usdstring required

The part of purchased_balance_usd staff gave for free.

activated_atstring date-time nullable required

Changes

Changed in 3 of the 30 revisions of this API.25

    • ○

      added the required property to the response with the status

      response-required-property-added

  • 499d0b94aa9423See the full diff
    • ●

      removed the request property

      request-property-removed

    • ●

      removed the request property

      request-property-removed

    • ○

      the request property became optional

      request-property-became-optional

    • ○

      request property list-of-types was widened by adding types null to media type application/json

      request-property-list-of-types-widened

    • ○

      added the required property to the response with the status

      response-required-property-added

    • ○

      endpoint added

      endpoint-added