#suj_api

1 messages ¡ Page 1 of 1 (latest)

proper bearBOT
#

👋 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.

ebon hamlet
#

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 without transaction_refresh will be successfully later?

velvet iron
#

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.

proper bearBOT
north grove
#

Hi taking over here

#

Yeah it's an async operation

#

Then you can retrieve the transactions

velvet iron
#

so awaiting is not enough.

Is best practice to setup a webhook to listen to the event then list the transactions?

north grove
#

Yeah webhook is best practice

#

So that you don't have to poll

velvet iron
#

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?

north grove
#

Yeah but why do you need to do this every 15 mins

velvet iron
#

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?

north grove
#

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

velvet iron
#

Can you elaborate on rate limiting. We will most likely be refreshing every bank at once then handling the events as we see them.

north grove
#

Depends how many bank accounts you have

#

May or may not be an issue