Can I request a Stripe account balance?

I looked through the documents and could not find a way to request balance information for Stripe managed accounts. A use case is used here: a third-party organization sets up a managed account through my platform with support for Stripe Connect enabled; I create several charged objects on their account after several customers buy goods / services (therefore their balance is now positive); Now they want to get paid, but I want to request their balance before issuing the transfer, to ensure that they do not ask more than on their account.

Of course, I miss something obvious. Thanks in advance.

+5
source share
3 answers

You should do this by simply highlighting the balance search request , and authentication as a connected account , for example:

curl https://api.stripe.com/v1/balance \ -H "Authorization: Bearer {PLATFORM_SECRET_KEY}" \ -H "Stripe-Account: {CONNECTED_STRIPE_ACCOUNT_ID}"

+3
source

So, for Ruby, based on Ywain's answer, I decided that instead of what is documented :

 Stripe.api_key = CONNECTED_STRIPE_ACCOUNT_SK Stripe::Balance.retrieve 

The best way that is not documented is as follows:

 Stripe::Balance.retrieve(stripe_account: CONNECTED_STRIPE_ACCOUNT_ID) 

while the current api_key is your platform account with the managed accounts option enabled.

+11
source

Php

 \Stripe\Balance::retrieve([ 'stripe_account' => CONNECTED_STRIPE_ACCOUNT_ID ]); 

Python

 stripe.Balance.retrieve( stripe_account=CONNECTED_STRIPE_ACCOUNT_ID ) 

ruby

 Stripe::Balance.retrieve( :stripe_account => CONNECTED_STRIPE_ACCOUNT_ID ) 

Node

 stripe.balance.retrieve({ stripe_account: CONNECTED_STRIPE_ACCOUNT_ID }, function(err, charge) {}); 
+3
source

All Articles