Stripe | Financial Infrastructure to Grow Your Revenue

Stripe | Financial Infrastructure to Grow Your Revenue

4466 articles

Query Connect analytical data


Public preview

Query Connect analytical data Public preview

Access aggregated financial metrics for all your connected accounts, including volume, revenue, fees, chargebacks, and payouts.

The account_financial_summary_hourly table provides a complete aggregated view of financial metrics for every connection between your platform and its connected accounts. Unlike the standard Connect tables, Connect analytical data covers all connected accounts and charge flows, regardless of which party is responsible for fees. This includes destination charges, on-behalf-of charges, facilitated direct charges, separate charges and transfers, and so on. For a full description of each charge type, see Connect charge types.

Learn more about the features for Connect analytical data.

Before you begin

Review the table details before you get started:

DetailValue
Table nameaccount_financial_summary_hourly
Schema structureVertical (one financial metric per row)
GrainOne row per hour, connected account, metric, currency, and dimensional combination
Date coverageJanuary 1, 2024–present
FreshnessApproximately T-1 day

Get started

The following query produces a pivoted financial summary for a specific connected account. It combines volume, revenue, Stripe fees, network costs, chargebacks, and payouts into one row per hour and currency. Use it as a starting point for margin calculations.

SELECT
 date_trunc('month',primary_revenue_date) AS activity_month,
 connected_account_merchant_id,
 currency,

 -- Volume
 SUM(CASE WHEN category='VOLUME' AND metric_type='GROSS_CONNECT_PAY_IN' THEN amount_usd END)
 AS gross_pay_in_usd,
 SUM(CASE WHEN category='VOLUME' AND metric_type='GROSS_CONNECT_TRANSFER' THEN amount_usd END)
 AS gross_transfer_usd,

 -- Revenue
 SUM(CASE WHEN category='REVENUE' AND metric_type='APPLICATION_FEE' THEN amount_usd END)
 AS application_fee_revenue_usd,
 SUM(CASE WHEN category='REVENUE' AND metric_type='IMPLICIT_APP_FEE' THEN amount_usd END)
 AS implicit_app_fee_revenue_usd,
 SUM(CASE WHEN category='REVENUE' AND metric_type='REVSHARE' THEN amount_usd END)
 AS revenue_revshare_usd,

 -- Platform Application Fees (gross fees charged to connected accounts)
 SUM(CASE WHEN category='APPLICATION_FEE' THEN amount_usd END)
 AS gross_application_fee_usd,

 -- Platform Application Fee Refunds
 SUM(CASE WHEN category='APPLICATION_FEE_REFUND' THEN amount_usd END)
 AS application_fee_refund_usd,

 -- Stripe Fees (platform-billed only; connected-account-billed rows excluded at source)
 SUM(CASE WHEN category='STRIPE_FEE' THEN amount_usd END)
 AS stripe_fees_usd,

 -- Network Costs
 SUM(CASE WHEN category='NETWORK_COST' THEN amount_usd END)
 AS network_cost_usd,

 -- Chargebacks
 SUM(CASE WHEN category='CHARGEBACK' AND metric_type='DISPUTE' THEN amount_usd END)
 AS dispute_amount_usd,
 SUM(CASE WHEN category='CHARGEBACK' AND metric_type='PAY_IN_REFUND' THEN amount_usd END)
 AS pay_in_refund_usd,

 -- Payouts
 SUM(CASE WHEN category='PAY_OUT' THEN amount_usd END) AS payout_usd,

 -- RevShare from Stripe (product-level rollup)
 SUM(CASE WHEN category='REVSHARE' THEN amount_usd END) AS revshare_usd

FROM account_financial_summary_hourly
-- NOTE: Add below filter to get data for specific connected account
-- WHERE connected_account_merchant_id='<connected_account_id>'
GROUP BY 1, 2, 3
ORDER BY 1 DESC

Schema overview

The account_financial_summary_hourly table uses a vertical (unpivoted) schema—rather than one wide row with a column per metric, each metric is stored by its own row, identified by the combination of category and metric_type. To produce side-by-side comparisons of multiple metrics, use the related setting the related setting pivots as shown in the previous example.

Dimension columns

The following table describes who the activity belongs to, when it occurred, and how the payment was processed.

ColumnTypeDescription
platform_merchant_idstringStripe account ID of the platform ( acct_…)
connected_account_merchant_idstringStripe account ID of the connected account ( acct_…)
connected_account_merchant_countrystringTwo-letter ISO country code of the connected account, such as US or GB
user_facing_payment_method_namestringPayment method name, such as card, ach_debit, sepa_debit, or affirm
charge_flowstringConnect charge flow. Values: the related setting, the related setting, the related setting, the related setting, the related setting, the related setting, the related setting, the related setting. For more details see how charges work in a Connect.
currencystringThree-letter ISO currency code, such as usd, eur, or gbp
card_fundingstringCard funding type ( credit, debit, prepaid). Populated for card transactions; null otherwise.
card_networkstringCard network ( visa, mastercard, amex). Populated for card transactions; null otherwise.
fee_payerstringWho bears the fee: the related setting or the related setting. Relevant for the related setting and the related setting rows; null for other categories.
product_feature_descriptionstringGranular product or feature label for fee rows, such as connect_payout_fixed.
primary_revenue_datetimestampWhen the activity was created.
reported_attimestampWhen the activity was settled.

Metric identifier columns

These two columns together identify which financial metric a row represents.

ColumnTypeDescription
categorystringHigh-level metric category. See the Categories and metrics reference below.
metric_typestringMetric type within the category.

Measure columns

These columns contain the numeric values for each metric row. All amount values are in the currency’s major unit (10.50 USD means $10.50).

ColumnTypeDescription
amountdecimal(38,18)Metric amount in the transaction’s original currency.
amount_usddecimal(38,18)Metric amount converted to USD. Use this for cross-currency comparisons.
activity_countintCount of underlying activities (transactions, disputes, payouts, and so on).
tax_amountdecimal(38,18)Tax amount in the transaction’s original currency.
tax_amount_usddecimal(38,18)Tax amount converted to USD.
tax_currencystringCurrency of the tax amount.

Categories and metrics reference

The following table lists every valid combination of category and metric_type.

CategoryMetric TypeDescription
the related settingthe related settingPay-in transactions across all charge flows. Use the charge_flow column to distinguish between the different types.
the related settingthe related settingDestination transfers
the related settingthe related settingOn-behalf-of destination transfers
the related settingthe related settingLinked transfers (to separate charges)
the related settingthe related settingStandalone unlinked transfers (sourced from the related setting)
the related settingthe related settingPay-in refunds. Use charge_flow for per-flow breakdown.
the related settingthe related settingDispute activity. Use charge_flow for per-flow breakdown.
the related settingthe related settingTransfer reversals. Use charge_flow for per-flow breakdown.
the related settingthe related settingStandalone unlinked transfer refunds (sourced from the related setting)
the related settingthe related settingGross platform pay-in volume.
the related settingthe related settingGross platform transfer volume.
PAY OUTthe related settingStandard payout volume and count
PAY OUTthe related settingInstant payout volume and count
PAY OUTthe related settingPriority payout volume and count
PAY OUTthe related settingOther payout types
the related settingthe related settingApplication fee revenue earned by the platform (pay-ins and instant payouts)
the related settingthe related settingImplicit app fee revenue (platforms on% pricing)
the related settingthe related settingRevenue share earned from Stripe
the related settingthe related settingAccount debit revenue
the related settingthe related settingAccount debit refund revenue
the related setting FEEthe related settingPlatform gross earnings on pay-ins (buy rate model)
the related setting FEEthe related settingPlatform gross earnings on captures
the related setting FEEthe related settingPlatform gross earnings adjustment for chargebacks
the related setting FEEthe related settingPlatform gross earnings on instant payouts
the related setting FEEthe related settingPlatform gross earnings on PMP captures
the related setting FEEthe related settingPlatform gross earnings on transfers
the related setting FEE the related settingthe related settingRefunds of platform fees on pay-ins
the related setting FEE the related settingthe related settingRefunds of platform fees on captures
the related setting FEE the related settingthe related settingPlatform fee adjustments for chargebacks
the related setting FEE the related settingthe related settingRefunds of platform fees on instant payouts
the related setting FEE the related settingthe related settingRefunds of platform fees on PMP captures
the related setting FEE the related settingthe related settingRefunds of platform fees on transfers
the related setting APP FEEthe related settingImplicit app fees collected on pay-ins
the related setting APP FEEthe related settingImplicit app fees collected on transfer reversals
the related setting APP FEEthe related settingImplicit app fee refunds on pay-in refunds
the related setting APP FEEthe related settingImplicit app fee refunds on disputes
the related setting APP FEEthe related settingImplicit app fee refunds on transfers
the related setting FEEthe related settingStripe fees for Connect product features.
the related setting FEEthe related settingStripe fee for instant payouts to connected accounts.
the related setting FEEthe related settingStripe fees for dispute handling and representment.
the related setting FEEthe related settingCard and payment processing fees.
the related setting FEEthe related settingCost-plus pricing markup fees.
the related setting FEEthe related settingTerminal hardware and usage fees.
the related setting FEEthe related settingStripe Tax calculation and integration fees.
the related setting FEEthe related settingAdaptive acceptance and auth optimization fees.
the related setting FEEthe related settingBilling and invoicing fees.
the related setting FEEthe related settingCard account updater fees.
the related setting FEEthe related settingFinancial connections verification fees.
the related setting FEEthe related settingRadar fraud prevention fees.
the related setting FEEthe related settingRefund-related Stripe fees.
the related setting FEEthe related settingPer-transaction Stripe fees across all payment methods and products.
the related setting the related settingthe related settingCard network interchange and assessment costs (cost+ pricing).
the related setting the related settingthe related settingNon-transaction network costs.
the related setting the related settingthe related settingNetwork fees on refund transactions.
the related setting FEEthe related settingNon transactional fee spread on payment.
the related settingthe related settingRevenue share from Payments product
the related settingthe related settingRevenue share from Issuing
the related settingthe related settingRevenue share from Billing
the related settingthe related settingRevenue share from Capital
the related settingthe related settingRevenue share from Instant Payouts
the related settingTAXRevenue share from Tax
the related settingthe related settingRevenue share from Treasury

Additional example queries

Refer to the following use-case example queries.

Retrieve a breakdown of revenue by connected account

Revenue earned from connected accounts, including application fees, implicit app fees, and revenue share. Use it to track which connected accounts generate the most platform revenue.

SELECT
 date_trunc('month',primary_revenue_date) AS activity_month,
 platform_merchant_id,
 connected_account_merchant_id,
 connected_account_merchant_country,
 metric_type AS revenue_type,
 currency,
 SUM(amount_usd) AS revenue_usd
FROM account_financial_summary_hourly
WHERE category = 'REVENUE'
GROUP BY 1, 2, 3, 4, 5, 6
ORDER BY 1 DESC, 7 DESC

Retrieve a summary of chargebacks and disputes by connected account

Chargeback and dispute activity for all connected accounts, by type and charge flow. Use it to monitor dispute rates and identify connected accounts with elevated chargeback risk.

SELECT
 date_trunc('month',primary_revenue_date) AS activity_month,
 connected_account_merchant_id,
 connected_account_merchant_country,
 metric_type AS chargeback_type,
 charge_flow,
 currency,
 SUM(amount_usd) AS chargeback_amount_usd,
 SUM(activity_count) AS event_count
FROM account_financial_summary_hourly
WHERE category = 'CHARGEBACK'
GROUP BY 1, 2, 3, 4, 5, 6
ORDER BY 1 DESC
Last verified 2026-09-24

Is this helpful?