# Adds the Reporting Query Runs API v2

## What’s new

Adds the [Reporting Query Runs API v2](https://docs.stripe.com/api/v2/data/reporting/query-runs.md?api-version=2026-04-22.preview), which allows you to programmatically run SQL queries against your Stripe data and retrieve the results.

This API introduces the [Query Run v2](https://docs.stripe.com/api/v2/data/reporting/query-runs/object.md?api-version=2026-04-22.preview) object (ID prefix `qryrun_`). You can [create](https://docs.stripe.com/api/v2/data/reporting/query-runs/create.md?api-version=2026-04-22.preview) a query run to execute a SQL query against your Stripe data and [retrieve](https://docs.stripe.com/api/v2/data/reporting/query-runs/retrieve.md?api-version=2026-04-22.preview) the status and results of a query run.

Query results are delivered through pre-signed S3 URLs that expire after 5 minutes for security. The API also includes [four events](https://docs.stripe.com/api/v2/data/reporting/query-runs/event-types.md?api-version=2026-04-22.preview) to track the query run lifecycle:

- `v2.data.reporting.query_run.created`
- `v2.data.reporting.query_run.succeeded`
- `v2.data.reporting.query_run.failed`
- `v2.data.reporting.query_run.updated`

## Impact

You can programmatically access and analyze your Stripe data without manually exporting reports from the Dashboard. This allows you to:

- Build custom analytics dashboards that pull data directly from your Stripe data
- Automate reporting workflows by executing SQL queries on a schedule
- Integrate Stripe data analysis into your existing business intelligence tools
- Create real-time monitoring and alerting based on your payment and business metrics

## Changes

#### REST API

|  | Change | Resource                                                                                                                  |
|  | ------ | ------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Endpoints            | Change | Resource                                                                                                                  |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `create`, `retrieve` | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `V2.Data.Reporting.QueryRun` |

#### Ruby

|  | Change | Resource                                                                                                                     |
|  | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [V2::Data::Reporting::QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods              | Change | Resource                                                                                                                     |
| -------------------- | ------ | ---------------------------------------------------------------------------------------------------------------------------- |
| `create`, `retrieve` | Added  | [V2::Data::Reporting::QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                      |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `V2::Data::Reporting::QueryRun` |

#### Python

|  | Change | Resource                                                                                                                  |
|  | ------ | ------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [v2.data.reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods              | Change | Resource                                                                                                                  |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `create`, `retrieve` | Added  | [v2.data.reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `v2.data.reporting.QueryRun` |

#### PHP

|  | Change | Resource                                                                                                                  |
|  | ------ | ------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods              | Change | Resource                                                                                                                  |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `create`, `retrieve` | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `V2.Data.Reporting.QueryRun` |

#### Java

|  | Change | Resource                                                                                                                  |
|  | ------ | ------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [v2.data.reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods              | Change | Resource                                                                                                                  |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `create`, `retrieve` | Added  | [v2.data.reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `v2.data.reporting.QueryRun` |

#### Node.js

|  | Change | Resource                                                                                                                  |
|  | ------ | ------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods              | Change | Resource                                                                                                                  |
| -------------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `create`, `retrieve` | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `V2.Data.Reporting.QueryRun` |

#### Go

|  | Change | Resource                                                                                                               |
|  | ------ | ---------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [V2DataReportingQueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods      | Change | Resource                                                                                                               |
| ------------ | ------ | ---------------------------------------------------------------------------------------------------------------------- |
| `Get`, `New` | Added  | [V2DataReportingQueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `V2DataReportingQueryRun` |

#### .NET

|  | Change | Resource                                                                                                                  |
|  | ------ | ------------------------------------------------------------------------------------------------------------------------- |
|  | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

| Methods         | Change | Resource                                                                                                                  |
| --------------- | ------ | ------------------------------------------------------------------------------------------------------------------------- |
| `Create`, `Get` | Added  | [V2.Data.Reporting.QueryRun](/api/v2/data/reporting/query-runs/object?api-version=2026-04-22.preview#v2_query_run_object) |

|                                                                                                                                                             | Change | Event type                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------- | ------ | ---------------------------- |
| `V2DataReportingQueryRunCreatedEvent`, `V2DataReportingQueryRunFailedEvent`, `V2DataReportingQueryRunSucceededEvent`, `V2DataReportingQueryRunUpdatedEvent` | Added  | `V2.Data.Reporting.QueryRun` |

## Upgrade

#### REST API

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. If you use an SDK, upgrade to the corresponding SDK version for this API version.
   - If you don’t use an SDK, update your [API requests](https://docs.stripe.com/api/versioning.md) to include `Stripe-Version: 2026-04-22.preview`
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Ruby

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your Ruby SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Python

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your Python SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### PHP

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your PHP SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Java

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your Java SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Node.js

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your Node SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### Go

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your Go SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).

#### .NET

1. [View your current API version](https://docs.stripe.com/upgrades.md#view-your-api-version-and-the-latest-available-upgrade-in-workbench) in Workbench.
1. Upgrade your .NET SDK to the latest version.
1. Upgrade the API version used for [webhook endpoints](https://docs.stripe.com/webhooks/versioning.md).
1. [Test your integration](https://docs.stripe.com/testing.md) against the new version.
1. If you use Connect, [test your Connect integration](https://docs.stripe.com/connect/testing.md).
1. In Workbench, [perform the upgrade](https://docs.stripe.com/upgrades.md#perform-the-upgrade). You can [roll back the version](https://docs.stripe.com/upgrades.md#roll-back-your-api-version) for 72 hours.

Learn more about [Stripe API upgrades](https://docs.stripe.com/upgrades.md).
