#Bogdan Onu - connect

1 messages ยท Page 1 of 1 (latest)

ripe finch
#

Hi there!

civic plaza
#

I tried that .. but it takes several dozen seconds .. and it does not even include the balance

ripe finch
#

I agree that's not ideal, but I don't see any other way.

civic plaza
#

I kind of want to replicate this

#

and saw the newly released search api .. but it does not seem to include the "connect" collection

#

๐Ÿ˜ฆ

ripe finch
#

and saw the newly released search api .. but it does not seem to include the "connect" collection
Yes, that's true.

civic plaza
#

is there an event that I can listen to for all balance changes ?

#

the balance.available seems that only fires when funds come in .. and not when come out

ripe finch
#

the balance.available seems that only fires when funds come in .. and not when come out
Yes, it is only sent when the amount of the balance is increasing (and not decreasing)

civic plaza
#

how should we approach it in order to resolve the query in 1-5 seconds ? what events should we listen in order to store the latest balance locally for all connected accounts and do the query in our databases ?

ripe finch
#

I would recommend the solution I shared before:

  • list all connected accounts with https://stripe.com/docs/api/accounts/list and then filter the results on your end
  • then you can store that information in your own database to access it more quickly in the future, but you'll need to update your database periodically to make sure it is up to date
civic plaza
#

is the balance included in the accounts/list ?

#

I may have missed it

ripe finch
#

No, you'll then need to retrieve the balance for each account individually, sorry

civic plaza
#

ok got it ... thanx for the input ! ๐Ÿ™