#newtreyes-expand-payout
1 messages · Page 1 of 1 (latest)
Yes, you can list balance transactions and filter them on their payout https://stripe.com/docs/expand/use-cases#charges-in-payout
Hello again!
Right
But the problem is slightly different
In my case, I don't know the specific payout
I have the balance transaction id and I want to find out the payout id for this transaction id
Does that make sense?
A different way to ask the same question: Is there any way to retrieve the payout for a payment intent / charge? Just like the dashboard shows.
Ah gotcha. Good question, I forget if the API is exposed that way but you can retrieve it I believe. Looking in to this and will get back to you
Thank you, @sleek valve
Hey, apologies for the delay. It looks like you can figure out which payout the charge went in to. The API doesn't expose the payout ID like that yet (though it is on the roadmap). For now, you can line up what payout had a certain charge by looking at the timestamps on the charge and payout
Basically you check the charge's balance transaction's available_on timestamp and then see what payout it was a part of by listing payouts and filtering on arrival_date[gte] that available_on time and arrival_date[lte] of available_on + one day day.
In most cases, that will return 1 payout, if it is possible for your users to have multiple payouts in a day. So if you get multiple payouts on that last step, you need to do the list balance transactions by payout call and check those transactions to see which is part of the charge
Of course! Sorry it is a bit complicated at the moment
Yeah
it's been causing us trouble
:/
QQ: do you know when this might be available?
aprox
No ETA at the moment unfortunately
newtreyes-expand-payout
@dusk parcel just to be a bit more crisp: no plan to ship this in the API, we're not working on it and it won't happen.
Oh
It would have been great
@covert dirge Re #dev-help message
Can you help me this that question?
I don't really understand the question unfortunately.
I also can't look into exact data in your account
So, a charge was included in a payout that is not returned when listing the payouts for the connected account the charge was related to.
This is a test account and it has been the case in the past that I have received help in the channel to understand why some specific scenario happened in those accounts.
I'm still not following I'm sorry
They usually ask me for the ids and then help me understand if we were missing something silly.
ch_3LkAQvIJwkxnVmNV0Et78OmD is on your platform
sure, but it's still in the platform
Correct
Sorry, the server is quite busy so I'll be really direct/speedy
The Charge ch_123 is on the platform. It does a Transfer tr_123 to the connected account. Both objects live on the platform. That results in a Charge py_123 on the connected account to represent the funds coming in
Your platform has a Payout po_123 for your balance. That will contain the ch_123 and the tr_123
the connected account has a Payout po_ABC, that will contain the py_123 not the ch_123
that's normal since ch_123 doesn't exist on their own account and they have no context about it.
If you want to link po_ABC back to ch_123, you can, it just requires going through the "graph of connections" really
txn_123 => source: 'py_123' => source_transfer: 'tr_123' => source_transaction: 'ch_123'
This assumes you list BalanceTransactions and pass payout: 'po_ABC' on the connected account and expand data.source.source_transfer.source_transaction
Does that make sense overall?
all good, just ping if you have more questions I'll keep the thread open for at least an hour (then someone will replace me)
@dusk parcel flagging that @glad sand is taking over but will keep that thread open