Public cloud services are based on the “pay as you go” model, which means that you only pay for what you use. Your monthly invoice is calculated at the end of each month and based on your hourly resource usage during the month.
With Scaleway’s Billing API, you can manage the billing of your Scaleway cloud services.
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
Refer to our Account concepts pageOpen in new context to find more information on features like billing alerts, and our dedicated pricing pageOpen in new context for full details about the rates applied on each Scaleway product.
Quickstart
-
Configure your environment variables.
Note
This is an optional step that seeks to simplify your usage of the API.
Code -
Run the following command to obtain your consumption over the current month.
Code -
Run the following command to list your invoices.
CodeYou should get an output similar to the following one, providing details about your invoices.
Note
This is a response example, the UUIDs displayed are not real.
Code -
Run the following command to download an invoice based on its ID.
Make sure to replace the example ID in the URL with the actual invoice ID you want to download.
Code
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 that 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
Technical limitations
The following limitations apply to use of the Billing API:
- 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 BillingManager permission set. If you were previously a Billing Administrator, you will automatically have been migrated to the BillingAdministrator group when you activated IAM, which gives you the appropriate permissions.
- You only need BillingReadOnly permissions to query consumption.
Going further
For more help using Scaleway’s Billing API, check out the following resources: