Stripe Reporting Query Runs API v2 runs SQL over Stripe data
Introduced 2026-04-22 · score 0.98
HOW TO USE IT
When a workflow needs programmatic analysis of Stripe data, create a Reporting Query Run with SQL and retrieve it to check status and obtain results. Download results through the returned pre-signed URL before it expires after 5 minutes; lifecycle events are listed in the release note.
curl https://api.stripe.com/v2/data/reporting/query_runs/<query_run_id> \
-H "Authorization: Bearer <YOUR_SECRET_KEY>" \
-H "Stripe-Version: 2026-04-22.preview"WHY THIS HELPS
For a repository workflow that needs to analyze Stripe data programmatically, run a SQL query against Stripe data and retrieve its status and results.
REQUIREMENTS AND LIMITATIONS
- Version: 2026-04-22.preview
- Availability: preview
- <query_run_id> (required): ID of the query run to retrieve; the reference example uses a qryrun_ ID.
- Authorization: Bearer <YOUR_SECRET_KEY> (required): Bearer authentication using a Stripe secret key.
- Stripe-Version (required): API version header; the reference example specifies 2026-04-22.preview.
- status: Returned current status: failed, running, or succeeded.
- result: Returned result details for a successfully completed query; includes a pre-signed download URL when results are ready.
- Prerequisite: A Stripe secret key is required for the documented Bearer-authenticated request.
- Prerequisite: Stripe documents a 403 query_run_api_inaccessible error when the API is unavailable to the request, such as when the feature is not enabled or the compartment is not allowed.
- Prerequisite: The release note states that result URLs expire after 5 minutes.
- Query results are delivered through pre-signed S3 URLs that expire after 5 minutes.
FIRST-PARTY EVIDENCE
- https://docs.stripe.com/changelog/dahlia/2026-04-22/reporting-query-runs-api-v2
- https://docs.stripe.com/api/v2/data/reporting/query-runs/retrieve?api-version=2026-04-22.preview
Check the installed version and the source before using it. Entry JSON