Billing API
Scaleway's Billing API provides a quick overview of your cloud consumption and allows you to monitor expenses. Public cloud services follow a 'pay as you go' model, ensuring you pay only for what you use. Some products offer plan options. Your monthly invoice is calculated at month-end based on exact resource usage and may include additional invoices for upfront payments during the month.
Note
You may also be interested in the Account APIOpen in new context to manage your Projects, and the IAM APIOpen in new context to manage users, permissions, and API keys in your Organization.
Concepts and pricing
Scaleway products offer different billing models, with billing cycles by the minute, hour, month, or year. For a clear estimate of product prices, visit our pricing pageOpen in new context. You will also find a cost estimator for each product in the console when you order a resource.
Money type
All fields referencing money across Scaleway APIs are represented with a common Money definition - AKA Money type.
The gRPC google.type.Money type is used to represent amounts of money with their currency type.
The Money type is defined by GoogleOpen in new context as such:
Code
Quickstart
Requirement
- You have an account and are logged into the Scaleway consoleOpen in new context
- You have created an API keyOpen in new context and the API key has sufficient IAM permissionsOpen in new context to perform the actions described on this page
- You have installed
curlOpen in new context
-
Configure your environment variables.
Note
This is an optional step that aims at simplifying your usage of the API.
Code -
Run the following command to obtain your consumption over the current month.
Code -
Run the following command to obtain your consumption over the current month for just one category of products.
Specify the target
category_nameas one of:BareMetalComputeContainersLabsManaged DatabasesManaged ServicesNetworkObject StorageObservabilitySecurity and IdentityServerlessStorageSubscription
Code -
Run the following command to obtain your consumption for a specific month.
Specify the target billing period as
YYYY-MM, e.g.,2023-11.Code -
Run the following command to obtain your consumption for a specific project only.
First, choose your target
project_id:CodeThen inject it in your API request:
Code
Technical information
IAM requirements
Keep in mind that:
- You must have appropriate IAM permissions to manage billing. If you are the Owner of the Organization, you will automatically have these permissions. Otherwise, you will need a policy giving you the
BillingManagerpermission set. If you were previously a Billing Administrator, you will automatically have been migrated to theBillingAdministratorgroup when you activated IAM, which gives you the appropriate permissions. - You only need
BillingReadOnlypermissions to query consumption.
Going further
For more help using Scaleway’s Billing API, check out the following resources: