#Sarim

1 messages · Page 1 of 1 (latest)

tropic pivotBOT
dusk mason
wide mauve
#

ok let me see

#

I couldn't unfortunately

#

@dusk mason did you see my thread with @errant wing

dusk mason
#

Do you have the payout ID?

wide mauve
#

Yes

dusk mason
#

Also share with me the relevant code

wide mauve
#

this is the link river send me for the reporting

dusk mason
#

OK, so you are retrieving balance transactions with a payout ID.

wide mauve
#

yes

#

$balanceTransactions = \Stripe\BalanceTransaction::all([
'payout' => 'po_****',
'type' => 'payout',
'expand' => ['data.source.source_transfer.source_transaction'],
], [
'stripe_account' => $this->data['row']->stripe_connect_account_id,
]);
pr($balanceTransactions);

#

this is my code

#

payout id also mentioned in the code

dusk mason
#

OK, can you check if you specify the correct stripe_account ?

wide mauve
#

let me check it

#

My bad

#

it was wrong account id

#

I get it now

#

there is a thing

dusk mason
#

Don't worry about it!

wide mauve
#

I need to fetch all payouts

#

for specific account till now

#

how can I get that

dusk mason
wide mauve
#

Actually I want the list for specific connected account

undone marten
#

Hey! Taking over for my colleague. Let me catch up.

undone marten
wide mauve
#

let me try

#

let me share my code with you

undone marten
#

yes something like that you need to set stripe_account with the conencted account you want to fetch its payouts

undone marten
#

It depends on what data you have, but I invite you to try it.

wide mauve
#

$balanceTransactions = \Stripe\Payout::all([
'limit' => 100
], [
'stripe_account' => $this->data['row']->stripe_connect_account_id,
]);
pr($balanceTransactions);

#

like this?

#

its not working actually I am trying

#

it is giving me
An uncaught Exception was encountered
Type: Error

Message: Call to private method Stripe\ApiResource::_validateParams() from context 'Stripe\Payout'

undone marten
wide mauve
#

no log

undone marten
#

You are using php right ?

wide mauve
#

yes

undone marten
#

I just did a test using this code snippets and it worked for me:

$stripe = new \Stripe\StripeClient(
    'sk_test_123'
);
echo($stripe->payouts->all(['limit' => 3],['stripe_account'=>'acct_123']));
wide mauve
#
                    'limit' => 100
                  ], [
                    'stripe_account' => $this->data['row']->stripe_connect_account_id,
                  ]);
                  pr($balanceTransactions);```
#

isn't that same?

#
                    'payout' => 'po_xxxx',
                    'type' => 'charge',
                    'expand' => ['data.source.source_transfer.source_transaction'],
                    'limit' => 100
                  ], [
                    'stripe_account' => $this->data['row']->stripe_connect_account_id,
                  ]); ```
wide mauve
#

thank you

#

@undone marten I found the solution

undone marten
#

Glad to hear that you managed to solve the issue by your self!