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

# PlanetScale

> Learn how to integrate Vantage with PlanetScale.

Vantage integrates with PlanetScale billing data via the PlanetScale Invoices API. Vantage connects to PlanetScale organizations through an OAuth flow, handled within the PlanetScale app. Vantage supports multiple PlanetScale organization integrations. All organizations are ingested after you connect via the OAuth flow and do not need to be individually added. After authorizing Vantage access to your PlanetScale organizations, Vantage will begin to ingest data using the PlanetScale Organizations, Invoices, and Databases endpoints.

The required PlanetScale scopes to connect are:

* User access
  * `read_organizations`
* Organization access
  * `read_organization`
  * `read_invoices`
  * `read_databases`

No access is granted to the actual databases themselves. Vantage can see only metadata related to the databases.

The Invoices endpoint provides structured cost data, broken down by service (e.g., Database or Support), category (e.g., PS-10, PS-20), and resource (e.g., the specific database). All credentials are encrypted.

Vantage supports Databases and Support services, as well as the following services for Branches:

* PS-10
* PS-20
* PS-40
* PS-80
* PS-160
* PS-320
* PS-400

## Connect Your PlanetScale Account

### Prerequisites

* You must have a Vantage **Organization Owner** or **Integration Owner** role to add or remove this integration. See the [Role-Based Access Control](/rbac) documentation for details.
* You will need the [Organization Admin role](https://planetscale.com/docs/concepts/access-control) in PlanetScale to complete the connection.
* [Create a free Vantage account](https://console.vantage.sh/signup), then follow the steps below to connect to PlanetScale.

### Create the Connection

<Steps>
  <Step>
    From the Vantage console, navigate to the [Integrations page](https://console.vantage.sh/settings/integrations).
  </Step>

  <Step>
    Select **PlanetScale**, then click **Connect PlanetScale Account**.
  </Step>

  <Step>
    You will be brought to the PlanetScale login screen. Log in to your account and select the organizations you want to connect with.
  </Step>

  <Step>
    Click **Authorize access**.
  </Step>

  <Step>
    After you authorize a connection, on the [PlanetScale Settings](https://console.vantage.sh/settings/planetscale/) page, you will see the status of your connection change to **Importing**.
  </Step>
</Steps>

After authorizing the connection, you will see the status of your integration change to **Importing** within the Vantage console. This status indicates that Vantage is actively importing your PlanetScale cost data. See the [Integration Status](/vantage_account#integration-status) documentation for details on integration statuses.

<Info>
  Once costs are processed, they will be available on your **All Resources** Cost Report.
</Info>

### Next Steps - Manage Workspace Access

Once the import is complete and the integration status changes to **Stable**, you can select which workspaces this integration is associated with. See the [Workspaces](/workspaces#manage-workspace-provider-integrations) documentation for information.

## Data Refresh

See the [provider data refresh documentation](/provider_data_refresh) for information on when data for each provider refreshes in Vantage.

## PlanetScale Reporting Dimensions

On PlanetScale [Cost Reports](/cost_reports/), you can filter costs across several dimensions:

* Category (e.g., PS-10, PS-20)
* Tag ([virtual tags](/tagging) created in Vantage for this provider)
* Resource (e.g., database name)
* Charge Type (e.g., Usage)
* Organization (organization ID)
* Service (e.g., Database or Support)

You can also view credits or discounts for PlanetScale costs in Cost Reports.

<Steps>
  <Step>
    At the top of any PlanetScale Cost Report, click **Settings**.
  </Step>

  <Step>
    Then, toggle on/off **Credits** and/or **Discounts**.
  </Step>
</Steps>

## Active Resources

PlanetScale databases are synced as active resources and available in [resource reports](/active_resources).
