#MorenoMdz

1 messages · Page 1 of 1 (latest)

plain pineBOT
jade quest
#

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

copper cedar
#

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?

jade quest
copper cedar
#

I basically need to understand if an account has a valid payment, which in our case means it is fully setup

jade quest
#

to clarify, you want to check if a connected account has had a payment on their account?

copper cedar
#

nope, if the user has added a valid bank account or debit card sorry\

jade quest
copper cedar
#

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?

jade quest
#

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

copper cedar
#

k, basically I need to match what we have in that screenshot

jade quest
#

umm, that's an entirely different matter then

copper cedar
#

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?

jade quest
#

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

copper cedar
#

I will also have to check if they have a balance : /

jade quest
copper cedar
#

kk