> ## 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.

# Aiven Billing Setup

> Connect Aiven billing data to Costory via the Aiven Billing API.

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

  <Tab title="Manual setup">
    Open Costory and go to **Billing > Import new billing datasource > Aiven**. The stepper guides you through each field.

    1. In the Aiven console, create a dedicated `costory` application user and grant it **organization:billing:read** permission.
    2. Generate an API token for the `costory` application user.
    3. Enter the **Organization ID** and **API Token** in the Costory stepper.

    Costory fetches invoice data via the Aiven Billing API. On first sync, Costory backfills up to **12 months** of historical data (depending on your Aiven account). New data appears the next day.
  </Tab>
</Tabs>

**What Costory includes**

* **Invoice-level billing data** from all Aiven services in your organization.
* **Per-service cost breakdown** (group by **Service name**).

**What Costory does not include**

* **Credits or promotional discounts** outside invoice line items.
* **Aiven support or marketplace fees** that are billed separately.
