#Jörgen

1 messages · Page 1 of 1 (latest)

nimble gladeBOT
warm ember
#

Are you interested in the prediction of when the funds land or are you looking more for an event about the funds becoming available?

lucid raft
#

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

warm ember
#

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

lucid raft
#

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

warm ember
#

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

lucid raft
#

🤔

#

if the balance has a status would that not suffice?

warm ember
#

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

lucid raft
#

jikes

lucid raft
#

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?

warm ember
#

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