> ## Documentation Index
> Fetch the complete documentation index at: https://docs.costory.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Scaleway Billing Setup

> Connect Scaleway cloud billing to Costory with an IAM secret key and Organization ID. Import consumption by category, product, and project.

Scaleway Instances, Object Storage, and managed services often sit outside your main cloud bill. Connect with an IAM **secret key** and **Organization ID** so consumption lands in [Explorer](/features/cost-explorer) next to AWS, GCP, Azure, and other [billing datasources](/setup/billing).

<Tabs>
  <Tab title="Manual setup">
    <Steps>
      <Step title="Create an IAM application">
        In the [Scaleway console](https://console.scaleway.com/), create an IAM application. Attach the **BillingReadOnly** policy at **Organization** scope. See [Scaleway IAM API keys](https://www.scaleway.com/en/docs/identity-and-access-management/iam/how-to/create-api-keys/).
      </Step>

      <Step title="Create an API key">
        Create an API key for that application. Copy the **secret key** immediately. It is shown once. The **access key** is optional in Costory. Costory can store it, but the billing API authenticates with the secret key only.
      </Step>

      <Step title="Copy the Organization ID">
        Copy the **Organization ID** from the Organization dashboard.
      </Step>

      <Step title="Connect in Costory">
        Go to [Integrations](https://app.costory.io/integration), click **+ Add integration**, then choose **Scaleway** under **Billing**. The connect URL is `/integration/new/scaleway/billing`.&#x20;
      </Step>

      <Step title="Enter connection details">
        Fill **Connection name** (default **Scaleway**), **Secret key**, and **Organization ID**. **Access key** and **Start date** are optional. Leave **Start date** empty to use Costory's default lookback.
      </Step>

      <Step title="Validate, then save">
        Click **Validate**. Costory calls `GET /billing/v2beta1/consumptions` with `X-Auth-Token` set to the secret key. **Save** stays disabled until validation succeeds. If this is the only billing source and it is demo data, Costory asks you to confirm before replacing it.
      </Step>
    </Steps>

    On first sync, Costory backfills up to **12 months** of consumption, depending on what Scaleway retains. New data then follows the usual [data refresh](/docs/data-refresh) cadence. SaaS sources typically appear in about **10 minutes**.
  </Tab>

  <Tab title="Terraform">
    Not supported yet.
  </Tab>
</Tabs>

## Field reference

| Field               | Required | Description                                                                 |
| ------------------- | -------- | --------------------------------------------------------------------------- |
| **Connection name** | Yes      | Label in **Integrations**.                                                  |
| **Secret key**      | Yes      | IAM API secret. Sent as `X-Auth-Token`. Stored in Costory's secret manager. |
| **Organization ID** | Yes      | Scaleway organization the consumption API should query.                     |
| **Access key**      | No       | Stored with the secret if you paste it. The billing API does not use it.    |
| **Start date**      | No       | Optional start of the first sync. Leave empty for the default lookback.     |

## What Costory includes

Costory pulls monthly consumption from the [Scaleway Consumption API](https://www.scaleway.com/en/developers/api/billing/consumption) and maps it into [Standard Columns](/docs/standard-columns).

Typical lines include:

* Categories such as Compute, Storage, Network, Object Storage, Serverless, and Observability
* Product name and SKU (for example a VPC Public Gateway size)
* Project and resource names when Scaleway returns them
* Billed quantity, unit, and monetary value

**How to analyze Scaleway costs**

* Spend by product: group by **Service name** or **SKU**
* Spend by project: group by **Billing account id** or **Sub account id** when those fields carry the Scaleway project
* Spend by invoice category: group by **Category**

**What Costory does not include**

* Credits, promotional discounts, or tax lines that never appear on the consumption API
* Support or marketplace fees billed outside consumption
* Write access to your Scaleway organization. Costory only calls the billing read endpoint

<Info>
  Rotate the secret key from **Integrations** when you need a new credential. The Organization ID stays the same.
</Info>

## Troubleshooting

| Issue                                     | What to check                                                                                                                                     |
| ----------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------- |
| Authentication fails                      | Recreate the API key and paste the **secret key**, not the access key. Confirm the IAM application has **BillingReadOnly** at Organization scope. |
| Organization not found                    | Confirm the **Organization ID** from the Organization dashboard, not a project ID.                                                                |
| Validation succeeds but Explorer is empty | Wait for the first sync (about 10 minutes). Check the datasource date range on [Integrations](https://app.costory.io/integration).                |

## Related pages

<CardGroup cols={2}>
  <Card title="Billing Data" icon="database" href="/setup/billing">
    All billing providers and shared setup notes.
  </Card>

  <Card title="Explorer" icon="chart-line" href="/features/cost-explorer">
    Filter and group Scaleway spend with the rest of your stack.
  </Card>

  <Card title="Standard Columns" icon="book" href="/docs/standard-columns">
    Normalized cost fields across providers.
  </Card>

  <Card title="Cloudflare billing" icon="cloud" href="/setup/billing/cloudflare">
    Import Cloudflare PayGo usage the same way.
  </Card>
</CardGroup>
