#Jörgen
1 messages · Page 1 of 1 (latest)
Are you interested in the prediction of when the funds land or are you looking more for an event about the funds becoming available?
the latter
preferably tied to the payment intent or similar
I want to initiate the payout as soon as the money is available and update a state in our application
You can listen for balance.available events https://stripe.com/docs/api/events/types#event_types-balance.available
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Not sure if there is an easy way to tie that to a specific payment intent but can look. Either way that will let you know when there is available money to pay out
yeah, I need to be able to tie the payout to an order internally
so far i triggered on the successful payment intent carrying metadata and propagated that to the payout
but that wouldnt work as the balance is not available
the dashboard ui seems to include transactions included in a payout, trying to figure out how that would be done
We have this but I think it only works after the payout has been created https://stripe.com/docs/expand/use-cases#charges-in-payout
Looks like there aren't other events triggered when balance.available is, so you may have to check the available_on timestamps of your balance transactions when you get that event to see where the balance came from
It looks like we don't have a pure API way of going from balance.available to the related transaction. For cases like this the recommendation is typically that your integration would be recording the available_on timestamp for your balance transactions as it is charging customers and then when you get that balance.available event, check which transactions' funds were supposed to appear today. Balance transactions also have a status parameter, so if any of them have a status that just became available, that is the transaction that you just got the funds for
Yes but there isn't an event for specific balance transaction objects. So without some idea of which balance transactions it might be you would have to iterate through all of them to find which one switched its status
jikes
but you are saying that if I use the available_on timestamp of the balance.available event and then filter all balance transactions for the same available_on it should match?
Not quite, the balance.available event doesn't have an available_on timestamp and the available_on timestamp for each balance transaction only gives you the date that it will be available