#suj_api
1 messages ¡ Page 1 of 1 (latest)
đ Welcome to your new thread!
â˛ď¸ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
âąď¸ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
đ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1408511681323077723
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
Thanks for waiting! Looking into this now
In https://dashboard.stripe.com/logs/req_lTrOMCQzXWMJtN, I don't see transaction_refresh being set. What's your expected behavior here? What is your use case with or without transaction_refresh set?
Waiting a bit then listing transactions again with the refresh_id == null. This actually pulled transactions which leads me to believe there is a lag from the refresh call to the refresh actually happening.
Do you mean that listing transactions withouttransaction_refreshwill be successfully later?
Sign in to the Stripe Dashboard to manage business payments and operations in your account. Manage payments and refunds, respond to disputes and more.
Use case without it set will be to pull all transactions available on the link (180 days). We then set refresh_id in our db and pass it next time the function is called to start pulling transactions only since the last refresh_id.
We get error There are no transactions to retrieve for this account. Refresh or subscribe to transactions to initiate a transaction refresh. when calling list after calling refresh. This does not make sense though because we await the refresh call above and then list the transactions
^^ This is why i asked if there is a delay between the refresh call finishing and the transactions actually refreshing.
Hi taking over here
Yeah it's an async operation
You need to wait until you get a https://docs.stripe.com/api/events/types#event_types-financial_connections.account.refreshed_transactions event
Then you can retrieve the transactions
so awaiting is not enough.
Is best practice to setup a webhook to listen to the event then list the transactions?
Awesome!
So our setup will be
- cron that initiates refresh every 15 minutes
- webhook that handles the event and lists transactions
Does that sound reasonable?
Yeah but why do you need to do this every 15 mins
We really need transactions to be as real time as possible. I know that not all banks refresh >1 per day. But we want to be as up to date as possible.
Does this seem overkill to you?
It does a bit but yeah I'm not really familiar with how often banks refresh
Also be careful with rate limiting if batching requests
Can you elaborate on rate limiting. We will most likely be refreshing every bank at once then handling the events as we see them.
You can read more here: https://docs.stripe.com/rate-limits
Depends how many bank accounts you have
May or may not be an issue