Chargeback

GET /chargeback/tenants/{id}/bill

Get current month’s bill

Compute the live bill for the current billing period

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Status Codes:
Response JSON Object:
  • currency (string)

  • is_estimate (boolean)

  • line_items[].charge (number)

  • line_items[].limit (integer)

  • line_items[].resource (string)

  • line_items[].unit_price (number)

  • period (string) – YYYY-MM

  • tenant_id (string)

  • total (number)

GET /chargeback/tenants/{id}/bill/pdf

Download current month’s bill as PDF

Generate a PDF invoice for the current billing period

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Status Codes:
GET /chargeback/tenants/{id}/bill/upcoming

Get upcoming month’s estimated bill

Project next month’s bill using scheduled prices (if any) and current limits

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Status Codes:
Response JSON Object:
  • currency (string)

  • is_estimate (boolean)

  • line_items[].charge (number)

  • line_items[].limit (integer)

  • line_items[].resource (string)

  • line_items[].unit_price (number)

  • period (string) – YYYY-MM

  • tenant_id (string)

  • total (number)

PUT /chargeback/tenants/{id}/billable

Toggle tenant billable status

Set whether billing is active for a tenant (is_billable true/false)

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Request JSON Object:
  • is_billable (boolean) – (required)

Status Codes:
Response JSON Object:
  • is_billable (boolean)

  • message (string)

  • tenant_id (string)

GET /chargeback/tenants/{id}/bills

List historical bills

Return all finalized (snapshotted) monthly invoices for a tenant

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Status Codes:
Response JSON Object:
  • [].currency (string)

  • [].is_estimate (boolean)

  • [].line_items[].charge (number)

  • [].line_items[].limit (integer)

  • [].line_items[].resource (string)

  • [].line_items[].unit_price (number)

  • [].period (string) – YYYY-MM

  • [].tenant_id (string)

  • [].total (number)

POST /chargeback/tenants/{id}/bills/snapshot

Snapshot (lock) current month’s bill

Persist the current month’s computed bill as an immutable invoice record

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Status Codes:
Response JSON Object:
  • currency (string)

  • is_estimate (boolean)

  • line_items[].charge (number)

  • line_items[].limit (integer)

  • line_items[].resource (string)

  • line_items[].unit_price (number)

  • period (string) – YYYY-MM

  • tenant_id (string)

  • total (number)

GET /chargeback/tenants/{id}/bills/{period}/pdf

Download a historical bill as PDF

Generate a PDF invoice for a finalized billing period (e.g. “2026-05”)

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

  • period (string) – Billing period in YYYY-MM format

Status Codes:
GET /chargeback/tenants/{id}/pricing

Get tenant pricing

Retrieve the current per-resource pricing for a tenant

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Status Codes:
Response JSON Object:
  • created_at (string)

  • currency (string)

  • is_billable (boolean)

  • price_per_cpu (number)

  • price_per_instance (number)

  • price_per_ip (number)

  • price_per_memory_mb (number)

  • price_per_network (number)

  • price_per_primary_storage_gb (number)

  • price_per_project (number)

  • price_per_secondary_storage_gb (number)

  • price_per_snapshot (number)

  • price_per_template (number)

  • price_per_volume (number)

  • price_per_vpc (number)

  • tenant_id (string)

  • upcoming_effective (string)

  • upcoming_pricing[] (integer)

  • updated_at (string)

PUT /chargeback/tenants/{id}/pricing

Set tenant pricing

Create or update per-resource monthly prices for a tenant (upsert). Pass upcoming_pricing + upcoming_effective to schedule a future price change.

Parameters:
  • id (string) – Tenant (CloudStack domain) ID

Request JSON Object:
  • currency (string)

  • price_per_cpu (number)

  • price_per_instance (number)

  • price_per_ip (number)

  • price_per_memory_mb (number)

  • price_per_network (number)

  • price_per_primary_storage_gb (number)

  • price_per_project (number)

  • price_per_secondary_storage_gb (number)

  • price_per_snapshot (number)

  • price_per_template (number)

  • price_per_volume (number)

  • price_per_vpc (number)

  • upcoming_effective (string)

  • upcoming_pricing.currency (string)

  • upcoming_pricing.price_per_cpu (number)

  • upcoming_pricing.price_per_instance (number)

  • upcoming_pricing.price_per_ip (number)

  • upcoming_pricing.price_per_memory_mb (number)

  • upcoming_pricing.price_per_network (number)

  • upcoming_pricing.price_per_primary_storage_gb (number)

  • upcoming_pricing.price_per_project (number)

  • upcoming_pricing.price_per_secondary_storage_gb (number)

  • upcoming_pricing.price_per_snapshot (number)

  • upcoming_pricing.price_per_template (number)

  • upcoming_pricing.price_per_volume (number)

  • upcoming_pricing.price_per_vpc (number)

Status Codes:
Response JSON Object:
  • created_at (string)

  • currency (string)

  • is_billable (boolean)

  • price_per_cpu (number)

  • price_per_instance (number)

  • price_per_ip (number)

  • price_per_memory_mb (number)

  • price_per_network (number)

  • price_per_primary_storage_gb (number)

  • price_per_project (number)

  • price_per_secondary_storage_gb (number)

  • price_per_snapshot (number)

  • price_per_template (number)

  • price_per_volume (number)

  • price_per_vpc (number)

  • tenant_id (string)

  • upcoming_effective (string)

  • upcoming_pricing[] (integer)

  • updated_at (string)