Skip to content

Stripe

Fetch balance transactions from Stripe, including automatic payout grouping and synthetic fee rows.

Generate a restricted API key at Stripe Dashboard > API keys with read access to Balance Transactions and Payouts.

Terminal window
export STRIPE_API_KEY=sk_live_...
Terminal window
vgrid fetch stripe --from 2026-01-01 --to 2026-02-01 --out stripe.csv

For Stripe Connect sub-accounts, pass --account:

Terminal window
vgrid fetch stripe --from 2026-01-01 --to 2026-02-01 --account acct_1234 --out stripe.csv
FlagDescriptionDefault
--fromStart date inclusive (YYYY-MM-DD)required
--toEnd date exclusive (YYYY-MM-DD)required
--api-keyStripe secret keySTRIPE_API_KEY env
--accountStripe Connect account ID (acct_...)
--outOutput CSV pathstdout
-q / --quietSuppress progress messagesoff
Stripe typeCanonical type
charge, paymentcharge
payoutpayout
stripe_fee, application_feefee
refundrefund
anything elseadjustment

Unmapped types include the original Stripe type in the description (e.g. [stripe_type: transfer]).

  • effective_datecreated timestamp converted to YYYY-MM-DD (UTC)
  • posted_dateavailable_on timestamp converted to YYYY-MM-DD (UTC)

Synthetic fee rows. When a balance transaction has a non-zero fee and is not itself a fee type, VisiGrid emits an additional fee row with source_id = "{source_id}_fee" and amount = -fee.

Payout grouping. After fetching all transactions, VisiGrid makes per-payout API calls to resolve which balance transactions belong to each payout. Transactions and their synthetic fee rows are tagged with group_id = po_xxx.

Pagination. Cursor-based (starting_after, 100 items per page) with stuck-cursor detection.

Sort order. created ascending, then source_id ascending.