Skip to main content
Arcanflows

Billing & Usage

Usage and allowances, standard tokens, the store catalog, subscription, invoices, purchases and service hours.

Overview

Read your workspace's usage and allowances, browse what it can buy, and manage its subscription and purchases.

bash
API=https://api.arcanflows.com/api/v1
TOKEN=...      # access_token from /auth/login
TENANT=...     # workspace id
  • Auth: Authorization: Bearer $TOKEN; send X-Active-Tenant: $TENANT when your user belongs to several workspaces. Every answer is about the active workspace; there is no tenant_id parameter.
  • Permissions: billing.read to read, billing.manage to buy, change or cancel. Workspace owners and admins have both.
  • Billing period: the calendar month in UTC unless your workspace's billing period says otherwise. "This period" below means the open one.
  • Errors: {"error": "...", "message": "..."} (see Errors). Payment routes answer 503 {"error": "billing is not configured"} when payments are not available on the installation.
bash
curl -s "$API/billing/usage/buckets" \
  -H "Authorization: Bearer $TOKEN" \
  -H "X-Active-Tenant: $TENANT"

Standard tokens vs raw tokens

Raw tokens are what the model provider counts: prompt plus completion tokens.

Standard tokens weight each model's raw tokens by its price relative to a reference model, so a model that costs five times more uses the allowance five times faster, and a cheaper one stretches it. To compensate, the plan's token limit is multiplied by an allowance factor.

Example with factor 4: a plan with 100M tokens shows a 400M standard-token allowance. 1,000 raw tokens on a model weighted 5× use 5,000 standard tokens; on a model weighted 0.5× they use 500.

The server runs one of three meters:

MeterEffect
rawthe allowance is counted in raw tokens; no standard figures
shadowraw tokens are enforced; standard tokens are computed and shown beside them
standardstandard tokens are enforced; plan limits are multiplied by allowance_factor

GET /billing/token-meter tells you which is active:

json
{ "meter": "standard", "allowance_factor": 4 }

Where each unit appears:

ReportsUnit
/billing/usage/buckets (tokens bucket), /billing/summary, /billing/summary/extendedstandard tokens under the standard meter, otherwise raw
/billing/usage/standard-tokensboth, per model
/billing/usage/monthly, /history, /daily, /providers-daily, /agents, /users, /people, /api-keysalways raw tokens
/billing/catalog/plans, /billing/plans (monthly_token_limit)raw; multiply by allowance_factor under the standard meter

So the summary can show 619,700 tokens used while the monthly report shows 124,506: the same usage, weighted and unweighted.

The weight of every model: GET /commercial-models/multipliers (permission models.read).

json
{
  "meter": "standard",
  "models": [
    { "model_id": "qwen3.7-plus", "display_name": "Qwen3.7 Plus", "provider": "alibaba",
      "priced": true, "input": 1, "output": 1, "cached_input": 0.2 },
    { "model_id": "qwen3.8-max", "display_name": "Qwen3.8 Max", "provider": "alibaba",
      "priced": true, "input": 5, "output": 3.75 }
  ]
}

input, output and cached_input multiply the raw input, output and cached-input tokens. The reference model has 1 / 1.


Usage and allowances

All need billing.read.

MethodPathReturns
GET/billing/usage/bucketsevery metered allowance: used, limit, percent
GET/billing/token-meteractive meter and factor
GET/billing/usage/standard-tokenstoken allowance in standard tokens, by model
GET/billing/summarytoken allowance this period
GET/billing/summary/extendedtokens, media and phone minutes this period
GET/billing/voice-usagephone minutes this period
GET/billing/plansquotas of the plans
GET/billing/usage/monthlyraw token totals for one month
GET/billing/usage/historyraw token totals for the last N months
GET/billing/usage/dailyraw tokens per day for one month
GET/billing/usage/providers-dailyraw tokens per day per provider (JSON or CSV)
GET/billing/usage/api-keysthis period per provider API key
GET/billing/usage/agentsthis period per agent
GET/billing/usage/usersthis period per user (tokens, top 20 by default)
GET/billing/usage/peoplethis period per person, tokens and media, everyone, paged
GET/billing/multimodal/usagespeech, image, video and audio totals for one month
GET/billing/multimodal/usage/dailythe same per day
GET/billing/multimodal/usage/usersthe same per user
GET/billing/multimodal/usage/agentsthe same per agent
GET/subscription/storagestorage used vs limit, by category

The dashboard reports (usage/history, usage/daily, usage/users, usage/api-keys, usage/people and the three multimodal/usage/* breakdowns) are cached for 60 seconds while the period includes now and 15 minutes once it has closed. The allowance routes (buckets, summary, standard-tokens) are computed on every call.

Allowances: GET /billing/usage/buckets

Every allowance, from the same check that blocks usage when a limit is reached, so this view and the enforcement agree.

json
{
  "meter": "standard",
  "buckets": [
    { "key": "tokens", "label": "Tokens", "unit": "standard tokens",
      "used": 619700, "limit": 400000000, "pct": 0.15, "allowed": true, "exceeded": false },
    { "key": "tts", "label": "Text-to-Speech", "unit": "characters",
      "used": 0, "limit": 7000000, "pct": 0, "allowed": true, "exceeded": false },
    { "key": "storage", "label": "Storage", "unit": "GB",
      "used": 3, "limit": 250, "pct": 1.49, "allowed": true, "exceeded": false },
    { "key": "voice_minutes", "label": "Phone Minutes", "unit": "minutes",
      "used": 0, "limit": 3000, "pct": 0, "allowed": true, "exceeded": false }
  ]
}
FieldMeaning
keytokens, tts, stt, image, video, audio, storage, voice_minutes, web_search, sms_messages, mms_messages
unittokens (standard tokens under the standard meter), characters, generations, seconds, GB, minutes, searches, segments
limit, pctnull = unlimited
allowedfalse once usage of this kind is blocked
exceededused >= limit
standard_used, standard_pcttokens bucket only, under the shadow meter

Storage is shown in whole GB, rounded down.

GET /billing/usage/standard-tokens

This period's token use by model, raw and weighted. Under the raw meter it returns only {"meter": "raw"}.

json
{
  "meter": "standard",
  "reference": { "model_id": "qwen3.7-plus", "display_name": "Qwen3.7 Plus" },
  "period_start": "2026-12-01T00:00:00Z",
  "period_end": "2027-01-01T00:00:00Z",
  "limit": 100000000,
  "standard_limit": 400000000,
  "allowance_factor": 4,
  "raw_tokens": 124506,
  "raw_pct": 0.1,
  "standard_tokens": 619700,
  "standard_pct": 0.2,
  "models": [
    { "model": "qwen3.8-max", "meter_basis": "priced", "calls": 3,
      "raw_tokens": 124506, "standard_tokens": 619700,
      "multipliers": { "model_id": "qwen3.8-max", "display_name": "Qwen3.8 Max",
                       "provider": "alibaba", "priced": true, "input": 5, "output": 3.75 } }
  ],
  "multipliers": [ { "model_id": "qwen3-vl-plus", "priced": true, "input": 0.5, "output": 1, "...": "..." } ]
}
  • limit is the plan's raw token limit; standard_limit = limit × factor.
  • meter_basis: priced (weighted by the model's price) or unmetered.
  • multipliers (top level) is the whole price table.
  • Percentages have one decimal; null when unlimited.

GET /billing/summary

json
{
  "current_period_start": "2026-12-01",
  "current_period_end": "2026-12-31",
  "plan_tier": "pro",
  "tokens_used": 619700,
  "tokens_limit": 400000000,
  "tokens_remaining": 399380300,
  "usage_percentage": 0.15,
  "overage_tokens": 0,
  "overage_cost": 0,
  "days_remaining": 30,
  "projected_usage": 19210700
}

Token figures follow the active meter (standard tokens in this example). projected_usage extrapolates this period's daily rate to the end of the period.

GET /billing/summary/extended

The same period with every media allowance and phone minutes. Abridged:

json
{
  "current_period_start": "2026-12-01",
  "current_period_end": "2026-12-31",
  "current_period_start_at": "2026-12-01T00:00:00Z",
  "current_period_end_at": "2026-12-31T23:59:59.999999Z",
  "plan_tier": "pro",
  "unique_users": 4,
  "unique_agents": 3,
  "days_remaining": 30,
  "tokens_used": 619700,
  "tokens_limit": 400000000,
  "tokens_remaining": 399380300,
  "tokens_percentage": 0.15,
  "tokens_overage": 0,
  "tokens_overage_cost": 0,
  "multimodal": {
    "tts":   { "used": 0, "limit": 7000000, "remaining": 7000000, "percentage": 0, "overage": 0, "overage_cost": 0 },
    "stt":   { "used": 0, "limit": 3500000, "remaining": 3500000, "percentage": 0, "overage": 0, "overage_cost": 0 },
    "image": { "used": 0, "limit": 2000, "remaining": 2000, "percentage": 0, "overage": 0, "overage_cost": 0 },
    "video": { "calls_used": 0, "calls_limit": 300, "seconds_used": 0, "seconds_limit": 7200, "percentage": 0, "overage_cost": 0 },
    "audio": { "used": 0, "limit": 7200, "remaining": 7200, "percentage": 0, "overage": 0, "overage_cost": 0 }
  },
  "voice": { "used": 0, "limit": 3000, "remaining": 3000, "percentage": 0, "overage": 0, "overage_cost": 0 },
  "total_overage_cost": 0
}

Note the token percentage is tokens_percentage here and usage_percentage in /billing/summary.

GET /billing/voice-usage

Phone minutes this period: {"used": 0, "limit": 3000, "pct": 0}.

GET /billing/plans

The quotas of the plans, as an array:

json
[
  {
    "plan_tier": "free",
    "monthly_token_limit": 100000,
    "max_agents": 2,
    "max_users": 1,
    "max_conversations_daily": 50,
    "features": {},
    "monthly_tts_chars_limit": 10000,
    "monthly_stt_chars_limit": 5000,
    "monthly_image_calls_limit": 10,
    "monthly_video_calls_limit": 5,
    "monthly_video_seconds_limit": 30
  }
]

For prices and what the store offers, use GET /billing/catalog/plans.

Raw token reports

PathQueryReturns
/billing/usage/monthlyyear (2020–2100), month (1–12); default nowbilling_month, total_tokens, prompt_tokens, completion_tokens, reasoning_tokens, cached_tokens, request_count, unique_users, unique_agents
/billing/usage/historymonths (1–24, default 6){"months": [...]}, same fields per month
/billing/usage/dailyyear, montharray of date, total_tokens, prompt_tokens, completion_tokens, request_count
/billing/usage/providers-dailydays (1–90, default 30), format=csv{"days": 30, "entries": [...]}: date, model_provider, calls, token columns, estimated_tokens
/billing/usage/agentslimit (default 20)array: agent_id, agent_name, status, total_conversations, total_messages, token columns, avg_response_time_ms, last_used_at, primary_model
/billing/usage/userslimit (1–100, default 20)array: user_id, user_email, total_tokens, conversation_count, last_active

usage/monthly answers 400 for an invalid year or month; the other reports fall back to the default for invalid values. providers-daily helps reconcile with the providers' own consoles: estimated_tokens is the part of total_tokens that was estimated because the provider reported no usage.

bash
curl -s "$API/billing/usage/providers-daily?days=7&format=csv" \
  -H "Authorization: Bearer $TOKEN" -o provider-daily-usage.csv

GET /billing/usage/api-keys

This period's usage per provider API key: the workspace's own keys and platform keys shared with it.

json
{
  "period_start": "2026-12-01",
  "period_end": "2026-12-31",
  "entries": [
    {
      "provider": "alibaba",
      "key_name": "Platform key (shared)",
      "key_source": "shared",
      "calls": 3,
      "prompt_tokens": 122242,
      "completion_tokens": 2264,
      "total_tokens": 124506,
      "models": [ { "model_name": "qwen3.8-max", "calls": 3, "total_tokens": 124506 } ],
      "agents": [ { "agent_id": "a1b2...", "agent_name": "General Agent", "calls": 3, "total_tokens": 124506 } ]
    }
  ]
}

Usage per person: GET /billing/usage/people

One row per person this month, tokens and media together, for every person in the workspace (/usage/users and /multimodal/usage/users stop at their limit). People with no usage are counted in idle and listed only with include_idle=1.

bash
curl -s "$API/billing/usage/people?include_idle=1" -H "Authorization: Bearer $TOKEN"
json
{
  "period": { "from": "2026-12-01T00:00:00Z", "to": "2027-01-01T00:00:00Z" },
  "people": [
    { "user_id": "95b0...", "email": "[email protected]", "name": "Ana López",
      "tokens": 52000, "conversations": 12, "speech_chars": 3400, "images": 2, "videos": 0,
      "last_active": "2026-12-01T09:12:00Z" }
  ],
  "idle": 30
}
  • tokens are raw tokens used in the person's own conversations. Usage without a person (automations, the API, scheduled tasks) is in no row; compare with /billing/usage/agents.
  • Media with no person appears as a row with user_id: "".
  • Default order: tokens, then speech_chars, descending.

Paging on the server. Add table=people to get one page instead of the whole report:

ParameterMeaning
table=peoplereturn one page of the people table
sortany row field, e.g. name, tokens, last_active
dirasc or desc; asc whenever sort is given without dir
page1-based, default 1
page_sizedefault 25, max 200
bash
curl -s "$API/billing/usage/people?include_idle=1&table=people&sort=name&page=2&page_size=10" \
  -H "Authorization: Bearer $TOKEN"
json
{ "table": "people", "total": 36, "page": 2, "page_size": 10, "pages": 4, "sort": "name", "dir": "asc",
  "rows": [ { "user_id": "...", "name": "Ana López", "email": "[email protected]", "tokens": 0, "...": "..." } ] }

paged=1 instead keeps the normal body, cuts people to page 1 and adds tables.people with the paging info. Empty values sort last in either direction.

Media usage

PathQueryReturns
/billing/multimodal/usageyear, monthtts_calls, tts_chars, tts_cost, stt_calls, stt_chars, stt_cost, image_calls, image_cost, video_calls, video_seconds, video_cost, audio_calls, audio_seconds, audio_cost
/billing/multimodal/usage/dailyyear, montharray, one row per day
/billing/multimodal/usage/userslimit (default 20)array, one row per user
/billing/multimodal/usage/agentslimit (default 20)array, one row per agent

Costs are USD at provider prices. An empty period returns [].

Storage: GET /subscription/storage

json
{
  "bytes_used": 4009855262,
  "bytes_limit": 268435456000,
  "recording_retention_days": 90,
  "breakdown": [
    { "category": "media", "bytes": 1778471972, "objects": 1738 },
    { "category": "document", "bytes": 1214171101, "objects": 643 },
    { "category": "recording", "bytes": 936193139, "objects": 129 }
  ]
}

Categories include media, document, recording, team_files, data_table, form_upload, avatar, studio, message_media, template, team_voice, other.


Catalog and store

What the workspace can buy. All billing.read.

MethodPathReturns
GET/billing/catalog/planspublic plans with prices and quotas
GET/billing/catalog/addonsadd-ons (monthly extras)
GET/billing/catalog/productsone-time packs
GET/billing/catalog/servicesprofessional services
GET/billing/promotions/availablepublic promotion codes running now
POST/checkout/validate-promotionchecks a code before checkout

GET /billing/catalog/plans

json
[
  {
    "plan_tier": "enterprise",
    "display_name": "Enterprise",
    "description": "For large organizations. Unlimited capacity with premium support.",
    "price_monthly": 499,
    "price_yearly": 4990,
    "trial_days": 0,
    "sort_order": 0,
    "cta_text": "Get Started",
    "highlight_features": [],
    "features": { "api_access": true, "rag": true, "voice": true, "workflows": true },
    "max_agents": 50,
    "max_users": 50,
    "max_conversations_per_day": -1,
    "monthly_token_limit": 50000000,
    "monthly_tts_chars_limit": 10000000,
    "monthly_stt_chars_limit": 5000000,
    "monthly_image_calls_limit": 2000,
    "monthly_video_calls_limit": 200,
    "monthly_video_seconds_limit": 5000
  }
]

Prices in USD. -1 = unlimited. Token limits are raw (see standard tokens).

GET /billing/catalog/addons

Recurring extras that raise allowances while active. Abridged:

json
[
  {
    "id": "3c9a...",
    "slug": "audio-pack-30min",
    "name": "Audio Pack - 30 Minutes",
    "description": "Adds 1,800 seconds of generated audio per month",
    "category": "multimodal",
    "price_monthly": 19.99,
    "price_yearly": 199.99,
    "yearly_available": true,
    "compatible_plans": ["free", "pro", "enterprise"],
    "is_stackable": false,
    "max_quantity": 1,
    "extra_tokens": 0,
    "extra_audio_seconds": 1800,
    "extra_voice_minutes": 0,
    "feature_flags": {},
    "badge_text": null,
    "icon": null,
    "sort_order": 0
  }
]

Each add-on has one extra_* field per allowance: extra_tokens, extra_agents, extra_users, extra_storage_gb, extra_tts_chars, extra_stt_chars, extra_image_calls, extra_video_calls, extra_video_seconds, extra_audio_seconds, extra_voice_minutes, extra_web_searches, extra_sms_segments, extra_mms_segments, extra_builder_tokens. compatible_plans lists the plan tiers that may buy it.

GET /billing/catalog/products

One-time packs that add to an allowance until used up or expired. Each has id, slug, name, description, category (e.g. token_pack), product_type (e.g. consumable), price, compare_at_price, compatible_plans, is_featured, badge_text, icon, service_description, sort_order, and an amount per allowance: tokens_amount, tts_chars_amount, stt_chars_amount, image_calls_amount, video_calls_amount, video_seconds_amount, audio_seconds_amount, voice_minutes_amount, web_searches_amount, sms_segments_amount, mms_segments_amount, builder_tokens_amount.

GET /billing/catalog/services

Professional services delivered by the ArcanFlows team or a partner: id, slug, name, description, category (e.g. agent_deployment), billing_type (one_time, monthly, yearly), price, price_per_hour, hours_included, compare_at_price, deliverables, requirements, compatible_plans, is_featured, badge_text, icon, sort_order.

GET /billing/promotions/available

Public promotion codes running now (at most 10):

json
{
  "promotions": [
    { "code": "LAUNCH20", "name": "Launch discount", "description": null,
      "discount_type": "percentage", "discount_value": 20,
      "expires_at": "2027-01-31T00:00:00Z", "campaign_name": null }
  ]
}

discount_type: percentage, fixed_amount or credits.

POST /checkout/validate-promotion

billing.read. Runs the same checks checkout runs, without creating anything.

json
{ "code": "LAUNCH20", "item_type": "plan", "plan_tier": "pro", "item_id": "", "billing_cycle": "monthly" }

code is required. item_type: plan (default), addon, product, service or any.

json
{ "valid": true, "code": "LAUNCH20", "discount_type": "percentage", "discount_value": 20,
  "duration_type": "recurring", "duration_months": 6, "description": "..." }

duration_type: once, recurring (for duration_months) or forever. A code that cannot be used answers {"valid": false, "code": "...", "reason": "..."}.


Subscription and checkout

Payments are processed by Stripe. The routes that buy or change something create Stripe objects or change a live subscription, so test them with care.

MethodPathPermissionDoes
GET/subscription/statusbilling.readcurrent plan and subscription state
GET/subscription/invoicesbilling.readinvoice history
GET/checkout/publishable-keybilling.read{"publishable_key": "pk_..."} for Stripe.js
POST/checkout/create-sessionbilling.managestarts a Stripe Checkout
GET/checkout/verify-sessionbilling.readresult of a finished checkout, ?session_id=cs_...
POST/subscription/change-planbilling.manageswitches plan, prorated
POST/subscription/cancelbilling.managecancels at the end of the period
POST/subscription/reactivatebilling.manageundoes a pending cancellation
POST/subscription/billing-portalbilling.managelink to the Stripe customer portal (cards, invoices)

GET /subscription/status

json
{
  "has_subscription": true,
  "plan_tier": "pro",
  "subscription_status": "active",
  "billing_interval": "monthly",
  "current_period_start": "2026-11-01T00:00:00Z",
  "current_period_end": "2026-12-01T00:00:00Z",
  "cancel_at_period_end": false,
  "addons_bill_with_plan": true
}

Adds payment_method (type, last4, brand) when one is on file. subscription_status comes from Stripe: active, trialing, past_due, canceled, unpaid, incomplete, incomplete_expired.

Without a subscription the answer is {"has_subscription": false, "plan_tier": "...", "status": "none"}; note the key is status in that case.

GET /subscription/invoices

The 50 most recent invoices, newest first. No parameters.

json
[
  {
    "id": "8f1d...",
    "tenant_id": "41b2...",
    "stripe_invoice_id": "in_...",
    "stripe_invoice_number": "ABCD1234-0004",
    "stripe_hosted_invoice_url": "https://invoice.stripe.com/i/...",
    "stripe_invoice_pdf": "https://pay.stripe.com/invoice/.../pdf",
    "amount_due": 38408,
    "amount_paid": 38408,
    "amount_remaining": 0,
    "subtotal": 38408,
    "tax": 0,
    "total": 38408,
    "currency": "usd",
    "status": "paid",
    "billing_reason": "subscription_create",
    "period_start": "2026-08-12T21:52:30Z",
    "period_end": "2026-08-12T21:52:30Z",
    "paid_at": "2026-08-12T21:52:34Z",
    "created_at": "2026-08-12T21:52:36Z"
  }
]

Amounts are in cents.

POST /checkout/create-session

json
{
  "item_type": "plan",
  "plan_tier": "pro",
  "billing_cycle": "monthly",
  "addon_ids": [],
  "promotion_code": "LAUNCH20",
  "success_url": "https://app.example.com/billing?status=success",
  "cancel_url": "https://app.example.com/billing?status=cancel"
}
FieldNotes
billing_cyclerequired: monthly or yearly
success_url, cancel_urlrequired
item_typeplan (default), addon, product, service
plan_tierfor plans
item_id, quantityfor an add-on, product or service (catalog id; quantity defaults to 1)
addon_idsadd-ons to subscribe together with a plan
promotion_codevalidated first; an unusable code answers 400 with the reason

Answers {"session_id": "cs_...", "session_url": "https://checkout.stripe.com/..."}. Send the browser to session_url. The purchase is applied once Stripe confirms the payment, usually within seconds of the redirect back. GET /checkout/verify-session?session_id=cs_... answers session_id, payment_status, status, item_type and processed (true once applied).

Change, cancel, reactivate, portal

  • POST /subscription/change-plan with {"new_plan_tier": "pro", "billing_cycle": "monthly"} (both required). Answers {"message", "plan_tier", "current_period_end"}. 409 when there is no active, trialing or past_due subscription: start a checkout instead.
  • POST /subscription/cancel (no body) cancels at the end of the period. Answers {"message", "cancel_at_period_end": true, "current_period_end"}.
  • POST /subscription/reactivate answers {"message", "cancel_at_period_end": false}.
  • POST /subscription/billing-portal with {"return_url": "https://..."} (required) answers {"url": "https://billing.stripe.com/..."}. 400 when the workspace has never paid through Stripe.

Purchases

MethodPathPermissionReturns
GET/billing/my-purchases/addonsbilling.readactive and cancelled add-ons
GET/billing/my-purchases/productsbilling.readpacks, with granted and used amounts
GET/billing/my-purchases/servicesbilling.readservice purchases with hours
DELETE/addons/:addonIdbilling.managecancels an add-on subscription
DELETE/billing/my-purchases/services/:purchaseIdbilling.managemarks a service purchase cancelled

GET /billing/my-purchases/addons

json
[
  {
    "id": "b7e0...",
    "addon_id": "3c9a...",
    "name": "25M Extra Tokens",
    "slug": "25m-extra-tokens",
    "category": "tokens",
    "quantity": 1,
    "price_at_purchase": 99,
    "billing_cycle": "monthly",
    "status": "active",
    "cancel_at_period_end": false,
    "starts_at": "2026-10-14 05:27:21.128922+00",
    "expires_at": null,
    "cancelled_at": null,
    "created_at": "2026-10-14 05:27:21.128922+00",
    "extra_tokens": 25000000,
    "extra_agents": 0
  }
]

Every extra_* field of the catalog is repeated. Timestamps in the three my-purchases lists use the format 2026-10-14 05:27:21.128922+00.

GET /billing/my-purchases/products

Per pack: id, product_id, name, slug, category, product_type, quantity, unit_price, total_price, discount_amount, status (e.g. active, expired), purchased_at, expires_at, and a *_granted / *_used pair per allowance (tokens, tts_chars, stt_chars, image_calls, video_calls, video_seconds, audio_seconds, voice_minutes, web_searches, sms_segments, mms_segments, builder_tokens).

GET /billing/my-purchases/services

Per purchase: id, service_id, name, slug, category, billing_type, hours_purchased, hours_used, amount_paid, status, current_period_start, current_period_end, expires_at, created_at, price_per_hour, deliverables, dedicated_consultant, rollover_unused_hours, hours_expiry_days.

Cancelling

  • DELETE /addons/:addonId: addonId is the catalog add-on id (addon_id in the list above). Answers {"message": "addon cancelled successfully"}; 409 if it is already cancelled.
  • DELETE /billing/my-purchases/services/:purchaseId: purchaseId is the purchase id. Only active purchases (409 otherwise).

Service hours and requests

How a workspace that bought a service asks for it to be delivered and follows it.

MethodPathDoes
GET/billing/service-hourshour balance and delivered sessions
POST/billing/services/:id/requestasks for delivery of a purchased service
POST/billing/service-hours/request-sessionasks for a session against remaining hours
GET/billing/service-requeststhe workspace's requests
GET/billing/services/slotstimes proposed to the workspace
POST/billing/services/slots/:id/acceptaccepts a proposed time
GET/billing/services/scheduleconfirmed deliveries you take part in
json
// GET /billing/service-hours
{
  "balance": { "total_hours_purchased": 5, "hours_used": 0, "hours_remaining": 5, "rollover_hours": 0 },
  "sessions": []
}

Sessions have id, title, hours_used, started_at, consultant_name, session_notes, status.

  • POST /billing/services/:id/request with {"notes": "..."} (optional). :id is the catalog service id. 400 when the workspace has no active purchase of it. Answers {"request_id", "status": "requested", "service"}; if a request for the same service is already open, that one is returned with "duplicate": true.
  • POST /billing/service-hours/request-session with {"notes": "..."}. 400 when no hours remain. Answers like the above plus hours_remaining.
  • GET /billing/service-requests → {"requests": [{"id", "service_id", "service_name", "status", "notes", "created_at", "updated_at", "scheduled_at"}]}. status: requested, accepted, scheduled, delivered, closed, declined.
  • GET /billing/services/slots → {"slots": [...]}. Accepting a slot that is no longer open answers 409.
  • GET /billing/services/schedule → {"entries": [{"id", "kind", "service_name", "counterparty", "role", "scheduled_at", "duration_minutes", "status"}]}; role is your side (e.g. customer).