How can the balance on a connected account be retreieved? (e.g. a connected account is like the 'host' in the Airbnb example).
I checked the balances docs, and hoped there'd be something like:
stripe_account = 'acct_lsdkjflsdkjflkj'
Stripe::Balance.retrieve(stripe_account)
but the docs only show how to get the balance for the platform's account, rather than that of a connected account.
I also tried Stripe::Account.retrieve('acct_lsdkjflsdkjflkj')
but that returns info about the account but the not balance.
CodePudding user response:
You would want to use the Stripe-Account header [0] to make API requests for connected accounts.
Example
$balance = Stripe::Balance.retrieve({stripe_account: 'acct_...'})