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:
| Detail | Value |
|---|---|
| Table name | account_financial_summary_hourly |
| Schema structure | Vertical (one financial metric per row) |
| Grain | One row per hour, connected account, metric, currency, and dimensional combination |
| Date coverage | January 1, 2024–present |
| Freshness | Approximately 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.
| Column | Type | Description |
|---|---|---|
platform_merchant_id | string | Stripe account ID of the platform ( acct_…) |
connected_account_merchant_id | string | Stripe account ID of the connected account ( acct_…) |
connected_account_merchant_country | string | Two-letter ISO country code of the connected account, such as US or GB |
user_facing_payment_method_name | string | Payment method name, such as card, ach_debit, sepa_debit, or affirm |
charge_flow | string | Connect 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. |
currency | string | Three-letter ISO currency code, such as usd, eur, or gbp |
card_funding | string | Card funding type ( credit, debit, prepaid). Populated for card transactions; null otherwise. |
card_network | string | Card network ( visa, mastercard, amex). Populated for card transactions; null otherwise. |
fee_payer | string | Who 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_description | string | Granular product or feature label for fee rows, such as connect_payout_fixed. |
primary_revenue_date | timestamp | When the activity was created. |
reported_at | timestamp | When the activity was settled. |
Metric identifier columns
These two columns together identify which financial metric a row represents.
| Column | Type | Description |
|---|---|---|
category | string | High-level metric category. See the Categories and metrics reference below. |
metric_type | string | Metric 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).
| Column | Type | Description |
|---|---|---|
amount | decimal(38,18) | Metric amount in the transaction’s original currency. |
amount_usd | decimal(38,18) | Metric amount converted to USD. Use this for cross-currency comparisons. |
activity_count | int | Count of underlying activities (transactions, disputes, payouts, and so on). |
tax_amount | decimal(38,18) | Tax amount in the transaction’s original currency. |
tax_amount_usd | decimal(38,18) | Tax amount converted to USD. |
tax_currency | string | Currency of the tax amount. |
Categories and metrics reference
The following table lists every valid combination of category and metric_type.
| Category | Metric Type | Description |
|---|---|---|
| the related setting | the related setting | Pay-in transactions across all charge flows. Use the charge_flow column to distinguish between the different types. |
| the related setting | the related setting | Destination transfers |
| the related setting | the related setting | On-behalf-of destination transfers |
| the related setting | the related setting | Linked transfers (to separate charges) |
| the related setting | the related setting | Standalone unlinked transfers (sourced from the related setting) |
| the related setting | the related setting | Pay-in refunds. Use charge_flow for per-flow breakdown. |
| the related setting | the related setting | Dispute activity. Use charge_flow for per-flow breakdown. |
| the related setting | the related setting | Transfer reversals. Use charge_flow for per-flow breakdown. |
| the related setting | the related setting | Standalone unlinked transfer refunds (sourced from the related setting) |
| the related setting | the related setting | Gross platform pay-in volume. |
| the related setting | the related setting | Gross platform transfer volume. |
| PAY OUT | the related setting | Standard payout volume and count |
| PAY OUT | the related setting | Instant payout volume and count |
| PAY OUT | the related setting | Priority payout volume and count |
| PAY OUT | the related setting | Other payout types |
| the related setting | the related setting | Application fee revenue earned by the platform (pay-ins and instant payouts) |
| the related setting | the related setting | Implicit app fee revenue (platforms on% pricing) |
| the related setting | the related setting | Revenue share earned from Stripe |
| the related setting | the related setting | Account debit revenue |
| the related setting | the related setting | Account debit refund revenue |
| the related setting FEE | the related setting | Platform gross earnings on pay-ins (buy rate model) |
| the related setting FEE | the related setting | Platform gross earnings on captures |
| the related setting FEE | the related setting | Platform gross earnings adjustment for chargebacks |
| the related setting FEE | the related setting | Platform gross earnings on instant payouts |
| the related setting FEE | the related setting | Platform gross earnings on PMP captures |
| the related setting FEE | the related setting | Platform gross earnings on transfers |
| the related setting FEE the related setting | the related setting | Refunds of platform fees on pay-ins |
| the related setting FEE the related setting | the related setting | Refunds of platform fees on captures |
| the related setting FEE the related setting | the related setting | Platform fee adjustments for chargebacks |
| the related setting FEE the related setting | the related setting | Refunds of platform fees on instant payouts |
| the related setting FEE the related setting | the related setting | Refunds of platform fees on PMP captures |
| the related setting FEE the related setting | the related setting | Refunds of platform fees on transfers |
| the related setting APP FEE | the related setting | Implicit app fees collected on pay-ins |
| the related setting APP FEE | the related setting | Implicit app fees collected on transfer reversals |
| the related setting APP FEE | the related setting | Implicit app fee refunds on pay-in refunds |
| the related setting APP FEE | the related setting | Implicit app fee refunds on disputes |
| the related setting APP FEE | the related setting | Implicit app fee refunds on transfers |
| the related setting FEE | the related setting | Stripe fees for Connect product features. |
| the related setting FEE | the related setting | Stripe fee for instant payouts to connected accounts. |
| the related setting FEE | the related setting | Stripe fees for dispute handling and representment. |
| the related setting FEE | the related setting | Card and payment processing fees. |
| the related setting FEE | the related setting | Cost-plus pricing markup fees. |
| the related setting FEE | the related setting | Terminal hardware and usage fees. |
| the related setting FEE | the related setting | Stripe Tax calculation and integration fees. |
| the related setting FEE | the related setting | Adaptive acceptance and auth optimization fees. |
| the related setting FEE | the related setting | Billing and invoicing fees. |
| the related setting FEE | the related setting | Card account updater fees. |
| the related setting FEE | the related setting | Financial connections verification fees. |
| the related setting FEE | the related setting | Radar fraud prevention fees. |
| the related setting FEE | the related setting | Refund-related Stripe fees. |
| the related setting FEE | the related setting | Per-transaction Stripe fees across all payment methods and products. |
| the related setting the related setting | the related setting | Card network interchange and assessment costs (cost+ pricing). |
| the related setting the related setting | the related setting | Non-transaction network costs. |
| the related setting the related setting | the related setting | Network fees on refund transactions. |
| the related setting FEE | the related setting | Non transactional fee spread on payment. |
| the related setting | the related setting | Revenue share from Payments product |
| the related setting | the related setting | Revenue share from Issuing |
| the related setting | the related setting | Revenue share from Billing |
| the related setting | the related setting | Revenue share from Capital |
| the related setting | the related setting | Revenue share from Instant Payouts |
| the related setting | TAX | Revenue share from Tax |
| the related setting | the related setting | Revenue 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
