#matthewwoodruff_best-practices
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/1347531941557047296
đ Have more to share? Add more details, code, screenshots, videos, etc. below.
hi there!
Is there a better way to know when a transaction changes state?
what do you mean by "transaction"? PaymentIntent?
oh, you are talking about BalanceTransactions?
yes sorry balance transactions https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-status
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
The problem with out current implementation is we're querying too much data too often and we're hitting rate limits from stripe. So we need a better way to pull in transactions.
why don't you use availble_on, to know when the BalanceTransaction becomes available? https://docs.stripe.com/api/balance_transactions/object#balance_transaction_object-available_on
then you no longer need to list BalanceTransaction. You can just listent to, for example, the payment_intent.succeeded webhook event, retrive the associated BalanceTrasaction, and store somewhere in your database when it will become available.