Workflow-first MVPDocs Center liveHelp routes reservedProjects & Billing in codeSupply & Marketplace in code

Billing

Billing now acts as the Day 4 commercial source of truth: subscription posture, included credits, accepted execution reservations, usage, and future settlement rules all stay aligned here before any live payment provider is connected.

Billing Overview

Billing now anchors the subscription, credit, and usage relationship

This page still avoids live payment collection, but Module 5 Day 4 now turns Billing into the shared commercial source of truth: subscription posture, included credits, accepted execution reservations, and downstream settlement all read from one model.

Service boundary: foundation-control-plane-service

State demoLiveEmptyError
Module 5 Day 4 shipped

Available

432

Reserved

24

Hold

8

Settlement threshold

100 CNY

Balance buckets

Keep plan balance, reserved execution cost, and settlement hold visible before live payments are turned on.

Growth launch plan

Included plan credits

included

500

Reference growth allowance used to demonstrate how accepted execution, reservation, and usage share the same commercial surface.

Available credits

bonus

432

Spendable reference balance after accepted execution reservations and settlement hold are already reflected in the current growth posture.

Reserved credits

reserved

24

Credits already reserved by accepted executions that passed identity, account, account_state, plan, project, and action checks.

Settlement hold

hold

8

Provider-side accounting held after accepted usage exists and before any future payout release.

Commercial relationship map

Day 4 fixes the relationship between subscription posture, credits, accepted execution, and usage before real billing enforcement starts.

Shared foundation truth

Subscription posture

account entitlement

Subscription posture unlocks capability bands and refills the baseline credit budget at the account boundary.

The subscription decides whether the account is active and what paid surfaces are allowed, but accepted execution still becomes billable through credits and usage instead of a hidden plan-only switch.

Upstream

identity -> billing account -> account stateplan capability

Downstream

included credits become wallet balanceaccepted execution can reserve credits only when the plan allows it

Surface: /workspace/billing

Credit wallet

account-owned wallet

Credits remain the spendable unit for accepted execution whether the operator calls the run a test or production.

Wallet state is account-owned, but the console must stay project-filterable so teams can explain where reserved, consumed, and held balance moved without splitting the billing account.

Upstream

included subscription creditsmanual grants or future top-ups

Downstream

reservation at accept-runconsumption, release, or settlement hold after execution

Surface: /workspace/billing

Accepted execution bridge

project execution -> account billing bridge

Accepted execution is the moment a project-scoped workflow becomes a commercial event.

Preview stays free. Once a run is accepted, the workflow keeps its project ownership, reserves account credits, and becomes the first durable receipt that usage and settlement can build on.

Upstream

workflow / project / object ownershipcredit gate after permission order passes

Downstream

queued run receiptusage reservation and later terminal usage evidence

Surface: /workspace/usage

Usage ledger

account ledger with project filters

Usage is the durable ledger story that ties reservation, consumption, and future settlement holds together.

Usage rows stay readable by project even when the underlying wallet is account-owned, so operators can audit accepted execution, later settlement, and commercial exceptions from one place.

Upstream

accepted execution receiptreservation / completion / settlement events

Downstream

billing overview and audit reviewfuture settlement eligibility and payout release

Surface: /workspace/usage

Recent billing events

This event list is reserved for accepted runs, grants, holds, and later invoice or payout evidence.

EventKindAmountCreated