Account

Billing, Wallet & Commerce

Check personal balance and metered usage, fund a shared Space Wallet, and sell one-time products and benefits inside published Apps.

This page explains how to inspect your personal Cohub balance and metered usage, fund a shared Space Wallet so usage inside a Space is paid centrally, and configure Space Commerce to sell one-time products and benefits in published Apps.

Personal billing and usage metering

Personal usage is billed against your account's credit balance and active subscription quotas. Manage everything in Settings → Billing (/settings/billing; /settings/balance redirects to /settings/billing).

What is metered and how pricing works

Cohub meters usage across model turns, generations, and workspace resources:

  • Models and agents: LLM turns (generation.llm), raw completions (generation.llm.raw), and decision calls (generation.decision).
  • Multimodal generation: image (generation.image), video (generation.video), audio and music (generation.audio, generation.music), and 3D (generation.3d).
  • Workspace resources: Sandbox compute (sandbox.compute), Space storage (space.storage), and custom App domains (app.domain).

Pricing and quota rules:

  • When pricing is locked: Generation tasks, raw completions, and decision calls are priced at admission and charged at that price. LLM turn messages are priced when each message settles, using the rules active at message creation time.
  • Discounts do not stack: When multiple campaign or subscriber discounts match a request, the lowest multiplier applies.
  • Quotas draw before money: When a quota rule covers a generation parameter (such as video seconds), quota units are drawn at admission before charging USD balance. Failed or cancelled generations return their drawn quota. Generations fully covered by quota appear in balance activity with $0.00.

View balance, credit sources, and activity in the web UI

Open Settings → Billing (/settings/billing) to review:

  • Balance and plan header: Current net balance, active plan name and renewal or end date, credits expiring within 7 days, plus actions to Top up, Upgrade (or Change plan), and Redeem code.
  • Credit sources: Expand to inspect active credit grants and quota grants with remaining/original amounts and expiry dates, or load used up and expired sources.
  • Activity tab: Chronological ledger grouped by day, filterable by All, Usage, Grant, and Refund. Select Usage by space and model (/settings/activity) for token, cost, and request totals across Spaces.
  • Plans tab (/settings/billing?tab=plans): Compare subscription plans, purchase one-time credit packs, and review subscription history.

Check billing and usage from the CLI

cohub me billing                                  # net balance, active plan, credits expiring within 7/30 days
cohub me billing-activity --filter usage          # filter: usage, grant, or refund
cohub me billing-activity --limit 20 --cursor <cursor>
cohub me activity --days 7                        # token, cost, and request totals across all Spaces
cohub me activity --from 2026-01-01 --to 2026-02-01

cohub me billing-activity defaults to 50 rows per page (max 100). cohub me activity defaults to the last 30 days; --days cannot be combined with --from or --to, and --to requires --from. Pass --json to any of these commands for machine-readable output.

Space Wallet

A Space Wallet holds dedicated funds for a single Space so members' usage inside that Space can be paid centrally instead of from each person's personal balance. Space Wallets operate independently of Space Commerce.

Open a Space's wallet from Space Settings → Space wallet (/spaces/<spaceId>/wallet).

Settlement and fallback rules

  • All-or-nothing settlement (no split payments): When usage inside a Space settles, Cohub checks the Space Wallet balance. If the Space Wallet covers the entire charge, the Space pays the full amount. Otherwise, the original caller's personal balance pays the full amount.
  • No personal discounts on Space charges: Personal subscription discounts and benefit multipliers apply only to personal charges. Space Wallet charges use the public or campaign price, so a usage made free by personal benefits is never routed to the Space Wallet.
  • No double charging on ambiguous debits: Once a debit is issued with wallet routing enabled, a timeout or error is logged and skipped rather than immediately debiting the other account.
  • Non-withdrawable and no access grant: Funds added to a Space Wallet cannot be withdrawn, and contributing to a Space Wallet does not grant Space membership or permissions.

Funding paths and limits

Method Where Rules and limits
Balance transfer (tier or custom amount) Space wallet (/spaces/<spaceId>/wallet), /spaces/<spaceId>/fund, or cohub spaces wallet transfer Moves purchased personal balance into the Space Wallet in whole USD from $1 to $5,000. Custom amounts are balance-only. Free and subscription credits are not transferable; bonus credits bundled with a purchase count as purchased. Transfers are final.
Online checkout (catalog tier) Space wallet, /spaces/<spaceId>/fund, or cohub spaces wallet recharge Purchases a one-time wallet tier product (no bonus credits). When your transferable balance already covers a selected tier in the web UI, balance is offered first with a Pay online instead switch.
Public funding /spaces/<spaceId>/fund or the Fund button on published Apps Available to any signed-in user once a Host enables Public funding. Balance and activity history remain restricted to users with space.view.

Your transferable balance is min(remaining one-time purchased credits, lifetime purchased − net transferred, net balance). Transfers require a direct signed-in user session — Agent execution tokens and App sessions cannot initiate transfers.

If a transfer is interrupted and returns processing, background recovery finishes crediting the Space Wallet or automatically refunds any uncredited remainder back to your personal balance with original credit types and expiry preserved.

Permissions

Action Required permission / role
View Space Wallet balance, catalog, and activity Signed-in user with space.view (Host, Builder, or Guest)
Fund via online checkout or personal balance transfer Signed-in user with space.view, or any signed-in user when Public funding is on (transfers also require a direct user session)
Toggle Public funding (fundingEnabled) Space Host (space.edit)

Manage Space Wallet from the CLI

cohub -s <space> spaces wallet balance
cohub -s <space> spaces wallet funding            # catalog tiers, public-funding state, and transferable balance
cohub -s <space> spaces wallet catalog
cohub -s <space> spaces wallet transfer 50        # whole USD ($1-$5,000) from purchased personal balance
cohub -s <space> spaces wallet transfer-status <request-uuid>
cohub -s <space> spaces wallet recharge <product-key>
cohub -s <space> spaces wallet confirm <request-uuid>
cohub -s <space> spaces wallet public-funding on  # on | off (Host only)
cohub -s <space> spaces wallet activity --json

If transfer or recharge ends with an uncertain network or server error, the CLI prints a retry command with --request-id <uuid>. Reusing the same UUID resumes the original transfer or checkout without creating a duplicate charge.

Space & App Commerce

Space Commerce gives a Space its own product catalog and order ledger so you can sell one-time products and grant entitlements inside the Space's published Apps.

Requirements and setup

  • Role: Viewing (space.commerce.view) and managing (space.commerce.manage) commerce require the Space Host role.
  • Plan entitlement: Initializing and managing Space Commerce requires a Max plan (space.commerce entitlement).
  • Web UI: Open Space Settings → Commerce (/spaces/<spaceId>/settings/commerce) and select Set up (one-time initialization per Space).

Benefits, products, and immutability rules

Space Commerce models purchases with two building blocks:

  1. Benefits — what a buyer receives:
    • Feature (feature): Access gate carrying a flat JSON metadata object (string, number, or boolean values). Name, description, status (active / archived), and metadata can be edited after creation.
    • Credits (credits): Consumable Space-scoped integer credits (amount ≥ 1) with optional expiration (expiresInDays ≥ 1). Benefit type, credit amount, and expiry are immutable after creation.
  2. Products — what a buyer pays for:
    • One-time USD pricing only; minimum $0.50 (up to 2 decimal places).
    • Optional Include Cohub Balance (--cohub-balance-usd): whole USD from $1 up to the product price, credited directly to the buyer's platform balance upon purchase. The underlying Cohub Balance benefit is platform-managed and cannot be manually edited, bound, or unbound.
    • Immutable fields: System key (productKey), price (amountUsd), and included Cohub Balance cannot be changed after creation. To change price or included balance, archive the existing product and create a new versioned product (for example pro_pack_v2).
    • Mutable fields: Name, description, status (draft, active, archived), and visibility (public, private). Draft products are hidden from buyers and cannot have benefits bound until active.

Bind one or more active benefits to an active product so buyers receive them immediately when checkout completes.

Published Apps in the Space automatically resolve the Space's active public products by productKey — no extra linking table is required. Inside an App, use client.app.commerce to resolve products, check getEntitlements(), trigger purchase({ productKey }), inspect orders, and call consumeCredits(). See App development for the full SDK flow.

Manage Space & App Commerce from the CLI

Configure a Space's catalog (cohub -s <space> spaces commerce):

cohub -s <space> spaces commerce setup

cohub -s <space> spaces commerce benefits create --name "Pro Access" --type feature --metadata-json '{"enabled":true}'
cohub -s <space> spaces commerce benefits create --name "100 Runs" --type credits --amount 100 --expires-in-days 30
cohub -s <space> spaces commerce benefits list
cohub -s <space> spaces commerce benefits update --benefit-key <key> --name "Pro Access Plus"
cohub -s <space> spaces commerce benefits archive --benefit-key <key> --yes

cohub -s <space> spaces commerce products create --name "Starter Pack" --amount-usd 9.99 --status active --visibility public
cohub -s <space> spaces commerce products create --name "Bundle" --amount-usd 10 --cohub-balance-usd 5
cohub -s <space> spaces commerce products list
cohub -s <space> spaces commerce products update --product-key <key> --description "Updated summary"
cohub -s <space> spaces commerce products archive --product-key <key> --yes

cohub -s <space> spaces commerce bind --product-key <product-key> --benefit-key <benefit-key>
cohub -s <space> spaces commerce unbind --product-key <product-key> --benefit-key <benefit-key> --yes
cohub -s <space> spaces commerce orders list --page 1 --limit 20

Inspect and test commerce against a published App (cohub apps commerce):

cohub apps commerce products resolve --app-id <app-id> --product-key <product-key>
cohub apps commerce entitlements --app-id <app-id>
cohub apps commerce credits consume --app-id <app-id> --amount 10 --reason "Run generation"
cohub apps commerce purchase --app-id <app-id> --product-key <product-key>
cohub apps commerce orders get --app-id <app-id> --order-id <order-id>

--app-id defaults to the current App execution context when run inside an App Action.

Boundaries and common errors

Symptom or error Cause and fix
Personal balance was charged even though the Space Wallet has funds Space Wallet only pays when its balance covers the entire charge (no split payments), and personal discounts do not reduce Space Wallet prices. Top up the Space Wallet above the full charge cost.
Transfer rejected for insufficient balance even though personal balance looks high enough Only one-time purchased balance is transferable ($1–$5,000 whole USD). Free grants and subscription credits cannot be transferred into a Space Wallet.
cohub spaces wallet transfer fails inside a Sandbox or Agent run (transfer_forbidden) Balance transfers require a direct signed-in user session, not an Agent execution token or App session. Unset COHUB_EXECUTION_TOKEN, run cohub auth login, and retry from a user shell.
Transfer or wallet checkout timed out or returned a 5xx error Reuse the printed --request-id <uuid> to continue the same transfer or checkout safely, or check state with cohub spaces wallet transfer-status <uuid> / confirm <uuid>. Uncredited transfer remainders refund automatically.
Wallet recharge unavailable (wallet_business_unavailable or wallet_unsupported_credits) The deployment does not have a separate Space Wallet billing business configured, or the wallet holds non-purchased/global grants. Usage continues on personal billing until the deployment configuration is fixed.
Space Settings → Commerce shows Managing commerce requires a Max plan, or CLI returns 402/403 Space Commerce requires both the Space Host role (space.commerce.manage) and an active Max plan (space.commerce entitlement).
Cannot change a product's price, included Cohub Balance, or a credit benefit's amount Prices, included Cohub Balance, and credit benefit amounts/expiry are immutable after creation. Archive the old item and create a new product or benefit with a new key.
Binding a benefit fails on a draft product, or editing a Cohub Balance benefit returns 403 Set the product to active before binding benefits. Platform-managed Cohub Balance benefits cannot be manually bound, unbound, or modified.
cohub apps commerce returns app not found or authorization denied App Commerce endpoints only work on published Apps. If the App has space visibility, the caller must have space.view on that Space.

Next steps

  • BYOK — run Chats on your own API key or model subscription instead of Cohub balance
  • Apps — publish Apps and control visibility where commerce products and the Fund button appear
  • App development — implement client.app.commerce checkout, entitlements, and credit metering in App code
  • Members, invites & access — Space roles (host, builder, guest) that govern wallet and commerce permissions
  • CLI — full reference for cohub me, cohub spaces, and cohub apps