#amory89-Connect

1 messages · Page 1 of 1 (latest)

rugged bloom
#

Sorry to hear that API is slow for you. It's the only way in API to fetch that property AFAIK. Do you need to do it often? Would it be feasible for implementing some kind of cache mechanism on your own?

knotty zephyr
#

Ya I can look into that. I do have to do it often. This may be outside of your purview (in which case just let me know), but I don't really know much about cache mechanisms - in theory, how would I know when to try to update the payouts_enabled data that is saved on my side if I don't actually check it?

#

Like if I understand you correctly, I could get all the stripe data and then save it on my side (caching it or whatever), but when someone's payouts_enabled value changes from false to true, how would my app know to get that new value?

rugged bloom
#

That's the use of webhook 🙂 You listen to the account.updatedwebhook, detect if any change on payouts_enabled, then update it back to your side

#

After a period of time, you can still do the Account List to "sync", and that period of time could be longer as you know you should almost have the newest updated data

knotty zephyr
#

in theory, if the webhook works, why should I ever need to sync with account list?

rugged bloom
#

It's not 100% accurate, like you know, sometimes request from Stripe to your server could timeout/error due to internet connection, but it would be tolerable. It's the tradeoff within business

knotty zephyr
#

ah and there is the answer

rugged bloom
#

theory, yes

knotty zephyr
#

you guys are geniuses and I think you're working for the greatest company in the world. thank you thank you!!!