#nitin_61278

1 messages · Page 1 of 1 (latest)

olive nebulaBOT
vale trout
#

Would that work for your use case?

azure stream
#

Is there any better solution

vale trout
#

I would need to know more details, like why that's not a good solution for you, what you would consider better, etc.

azure stream
#

We have payout ID and based on that we want to find tranfer ID for that payout

vale trout
#

That's covered by the second part of the section I linked to, right?

#

Or am I misunderstanding what you're trying to do?

azure stream
#

balance_transactions = Stripe::BalanceTransaction.list({
payout: 'po_1Gl3ZLLHughnNhxyDrOia0vI',
type: 'charge',
expand: ['data.source'],
})

vale trout
#

No, the second one.

azure stream
#

#<Stripe::BalanceTransaction:0x19564 id=txn_1OdMrKDWklh8LgDYeDKTL69u> JSON: {
"id": "txn_1OdMrKDWklh8LgDYeDKTL69u",
"object": "balance_transaction",
"amount": -42531,
"available_on": 1706486400,
"created": 1706404110,
"currency": "usd",
"description": "STRIPE PAYOUT",
"exchange_rate": null,
"fee": 0,
"fee_details": [

],
"net": -42531,
"reporting_category": "payout",
"source": "po_1OdMrKDWklh8LgDYpXBYGVDR",
"status": "available",
"type": "payout"
}

vale trout
#

You're looking at the first part, look at the second part.

azure stream
#

both are giving same output

vale trout
#

What are you specifying for expand in the second version?

azure stream
#

Stripe::BalanceTransaction.list({payout: payout.id,type: 'payment',expand: ['data.source.source_transfer.source_transaction']})

vale trout
#

You need to also specify the connected account ID using stripe_account as shown in the example.

#

The request needs to be made on the connected account.

azure stream
#

i have only payout object. how can i get account ID from that

wintry sorrel
#

Do you know what account this payout happens on?

azure stream
#

i am doing this in webhook

#

i don't knoe how to find account id there

wintry sorrel
#

Are you doing this on your Platform account?

azure stream
#

yes

#

Still not getting account

#

showing null

wintry sorrel
#

What event type are you listening to.

azure stream
#

payout.paid

wintry sorrel
#

Could you please share the Event ID evt_xxx?

azure stream
#

evt_3OeNVJDWklh8LgDY1rgMDQVq

wintry sorrel
#

That's a charge.succeeded event on the Platform account.