---
title: "Building custom financial reconciliation workflows with Stripe"
description: "The post examines how enterprises can replace SFTP-based financial reconciliation with Stripe’s reporting APIs. Stripe’s Reports API v2 and Query Run API provide SQL-based report customization, consistent schemas, API-key permissioning, audit trails, and event-driven completion notifications instead of fixed files and polling schedules. Using fictional retailer Galtee, the examples run payout queries across multiple Stripe accounts with an Organization secret key, joining transfers with balance_transactions and using a succeeded webhook to trigger retrieval. Further queries join charges to add presentment amounts and exchange rates, then use aggregation and a common table expression to itemize IC+ fees; the conclusion is that this supports an on-demand pipeline that evolves with business requirements."
---

# Building custom financial reconciliation workflows with Stripe

[Stripe](https://yomu.fyi/company/stripe) · Maia Robinson · Sep 18, 2026

**Type:** Tutorial

## Summary

The post examines how enterprises can replace SFTP-based financial reconciliation with Stripe’s reporting APIs. Stripe’s Reports API v2 and Query Run API provide SQL-based report customization, consistent schemas, API-key permissioning, audit trails, and event-driven completion notifications instead of fixed files and polling schedules. Using fictional retailer Galtee, the examples run payout queries across multiple Stripe accounts with an Organization secret key, joining transfers with balance\_transactions and using a succeeded webhook to trigger retrieval. Further queries join charges to add presentment amounts and exchange rates, then use aggregation and a common table expression to itemize IC+ fees; the conclusion is that this supports an on-demand pipeline that evolves with business requirements.

## Context

The post addresses financial reconciliation systems built around SFTP files, cron jobs, polling, fixed templates, and static schedules. It contrasts those limitations with Stripe reporting APIs designed for enterprise scalability, consistent schemas, and autonomous customization by engineering teams.

## Approach / What changed

Use Stripe’s Query Run API to execute parameterized SQL against reporting tables, including transfers, balance\_transactions, charges, and icplus\_fees. An Organization secret key runs the query across multiple Stripe accounts, while the v2.data.reporting.query\_run.succeeded webhook triggers retrieval. The SQL is extended with joins, exchange-rate fields, fee aggregation, conditional logic, and a common table expression as reporting requirements evolve.

## Takeaways

- An Organization secret key lets a Query Run API workflow execute a payout-reconciliation query across Galtee’s D2C and B2B Stripe accounts.
- Joining balance\_transactions with charges adds settlement and presentment amounts, currencies, and the exchange rate used for currency conversion.
- A common table expression groups IC+ fees by charge, allowing the report to expose interchange, card-scheme, volume, per-authorization, network, and Stripe fee totals.

## FAQ

### How does the workflow reconcile payouts across multiple Stripe accounts?

Galtee groups its D2C and B2B Stripe accounts under an Organization and uses the Organization secret key to run the same SQL query across them. The query joins transfers with balance\_transactions to list activity contributing to payouts on a specified date.

### How are local-currency payments represented in the report?

The report joins charges to balance\_transactions and adds the charge currency and amount as presentment fields. It also includes the balance transaction’s settlement currency, settlement amount, and exchange\_rate.

### How can the report show itemized IC+ fees?

The query groups icplus\_fees by charge\_id and sums fee categories such as interchange, card\_scheme, volume\_fee, and per\_auth\_fee. The resulting values are joined back to charge rows, with COALESCE used for zero values and additional network and Stripe fee totals calculated.

**Tags:** [Payments](https://yomu.fyi/topic/payments), [SQL](https://yomu.fyi/topic/sql), [Stripe](https://yomu.fyi/topic/stripe)

- Source: [Stripe](https://stripe.dev/blog/building-custom-financial-reconciliation-workflows-with-stripe)
- Source URL: https://stripe.dev/blog/building-custom-financial-reconciliation-workflows-with-stripe
- Ingested by Yomu: 2026-09-19T00:00:14.166Z

[Read original post](https://stripe.dev/blog/building-custom-financial-reconciliation-workflows-with-stripe)
