#MorenoMdz
1 messages · Page 1 of 1 (latest)
hello! we don't have any parameter to filter by the email. You're probably going to need to retrieve all the connected accounts via the API and perform your own filtering
kk, good thing I know the users to target at least ><
thanks again Alex!
One more @jade quest , this is the payouts_enabled field in the accounts retrieve response?
there's two fields there - payouts_enabled and charges_enabled
https://stripe.com/docs/api/accounts/object#account_object-charges_enabled
https://stripe.com/docs/api/accounts/object#account_object-payouts_enabled
I basically need to understand if an account has a valid payment, which in our case means it is fully setup
to clarify, you want to check if a connected account has had a payment on their account?
nope, if the user has added a valid bank account or debit card sorry\
if you want to check if the connected account has added a bank account - you can check if they have an external_account : https://stripe.com/docs/api/accounts/object#account_object-external_accounts
So I could use this data
external_accounts: {
object: 'list',
data: [Array],
has_more: false,
total_count: 1,
url: '/v1/accounts/acct_1MjzWDFL2qv6HKjC/external_accounts'
},
total_count would do it?
i would say so, yes
i don't know what's your exact criteria so you may want to check and see the data in it too
k, basically I need to match what we have in that screenshot
umm, that's an entirely different matter then
for example, this user has 3 accounts
acct_1MnsDWFMKi9K8zfg acct_1MnsBn2UbT3osWuq
acct_1MnsZQFbH0gSV0Kl
But only the first one is "enabled", the other two are "restricted" and say "Add a bank account or debit card to enable payouts."
I need to find the "enabled" account and add to their profile in our system
One quick example from my script:
[
{
stripeAccountId: 'acct_1MhFdMFVZEmcUUdi',
payoutsEnabled: true,
externalAccountsCount: 1
},
{
stripeAccountId: 'acct_1MhFad2YoLTL8QKI',
payoutsEnabled: true,
externalAccountsCount: 1
},
{
stripeAccountId: 'acct_1MhFRjFNfJ78OyyP',
payoutsEnabled: false,
externalAccountsCount: 0
}
]
This user has these 3 accounts, we can see that the first two are good I think.
Q, can the same external account be used in multiple stripe connect accounts?
we don't have a parameter that returns those values : enabled, restricted , completed in the Account API - this is a Dashboard only display.
If you want a simple mapping, i would suggest looking at both charges_enabled and payouts_enabled to ensure both are true
I will also have to check if they have a balance : /
you can retrieve the balance on the connected account by making this API request : https://stripe.com/docs/api/balance/balance_retrieve with the StripeAccount header : https://stripe.com/docs/connect/authentication
kk