Documentation for scw billing

March 6, 2025 ยท View on GitHub

This API allows you to manage and query your Scaleway billing and consumption.

Consumption management commands

Consumption management commands.

Get monthly consumption

Consumption allows you to retrieve your past or current consumption cost, by project or category.

Usage:

scw billing consumption list [arg=value ...]

Args:

NameDescription
order-byOne of: updated_at_desc, updated_at_asc, category_name_desc, category_name_ascOrder consumptions list in the response by their update date
project-idProject ID to use. If none is passed the default project ID will be used
category-nameFilter by name of a Category as they are shown in the invoice (Compute, Network, Observability)
billing-periodFilter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default
organization-idOrganization ID to use. If none is passed the default organization ID will be used

Get monthly consumption taxes

Consumption Tax allows you to retrieve your past or current tax charges, by project or category.

Usage:

scw billing consumption list-taxes [arg=value ...]

Args:

NameDescription
order-byOne of: updated_at_desc, updated_at_asc, category_name_desc, category_name_ascOrder consumed taxes list in the response by their update date
billing-periodFilter by the billing period in the YYYY-MM format. If it is empty the current billing period will be used as default
organization-idOrganization ID to use. If none is passed the default organization ID will be used

Discount management commands

Discount management commands.

List discounts

List all discounts for your Organization and usable categories, products, offers, references, regions and zones where the discount can be applied. As a reseller:

  • If you do not specify an organization_id you will list the discounts applied to your own Organization and your customers
  • If you indicate your organization_id you will list only the discounts applied to your Organization
  • If you indicate the organization_id of one of your customers, you will list the discounts applied to their Organization.

Usage:

scw billing discount list [arg=value ...]

Args:

NameDescription
order-byOne of: creation_date_desc, creation_date_asc, start_date_desc, start_date_asc, stop_date_desc, stop_date_ascOrder discounts in the response by their description
organization-idID of the organization

Invoice management commands

Invoice management commands.

Download an invoice

Download a specific invoice, specified by its ID.

Usage:

scw billing invoice download <invoice-id ...> [arg=value ...]

Args:

NameDescription
invoice-idRequiredInvoice ID
file-pathDefault: ./Wanted file path
file-typeDefault: pdfWanted file extension
force-replaceDefault: falseForce file replacement

Export invoices

Export invoices in a CSV file.

Usage:

scw billing invoice export [arg=value ...]

Args:

NameDescription
organization-idOrganization ID. If specified, only invoices from this Organization will be returned
billing-period-start-afterReturn only invoice with start date greater than billing_period_start
billing-period-start-beforeReturn only invoice with start date less than billing_period_start
invoice-typeInvoice type. It can either be periodic or purchase
file-pathDefault: ./Wanted file path
file-typeDefault: csvWanted file extension
force-replaceDefault: falseForce file replacement

Get an invoice

Get a specific invoice, specified by its ID.

Usage:

scw billing invoice get <invoice-id ...> [arg=value ...]

Args:

NameDescription
invoice-idRequiredInvoice ID

List invoices

List all your invoices, filtering by start_date and invoice_type. Each invoice has its own ID.

Usage:

scw billing invoice list [arg=value ...]

Args:

NameDescription
billing-period-start-afterReturn only invoice with start date greater than billing_period_start
billing-period-start-beforeReturn only invoice with start date less than billing_period_start
invoice-typeOne of: unknown_type, periodic, purchaseInvoice type. It can either be periodic or purchase
order-byOne of: invoice_number_desc, invoice_number_asc, start_date_desc, start_date_asc, issued_date_desc, issued_date_asc, due_date_desc, due_date_asc, total_untaxed_desc, total_untaxed_asc, total_taxed_desc, total_taxed_asc, invoice_type_desc, invoice_type_ascHow invoices are ordered in the response
organization-idOrganization ID. If specified, only invoices from this Organization will be returned