I am transferring fund from stripe account to connect account using payout api my code is:
$payout = \Stripe\Payout::create([
'amount' => 500,
'currency' => 'aud',
'description' => 'first payout payment transfer on stripe',
'destination' => 'bank_id',
'method' => 'instant',
'source_type' => 'bank_account',
'statement_descriptor' => 'first payout payment transfer on stripe ',
]);
after hit this api show error:
Stripe\\Exception\\InvalidRequestException: No such external account: ba_1G497bAoBoRegJgCC1jj2UE2 in file /var/www/html/ultimateFitness/app/Stripe/lib/Exception/ApiErrorException.php on line 38
Also i am follow stripe documentation: https://stripe.com/docs/api/payouts/creat e
You need to make the call on behalf of the connected account — right now it gives an error because it's looking for the bank account on your Stripe account, not the connected one.
https://stripe.com/docs/connect/authentication
$payout = \Stripe\Payout::create([
'amount' => 500,
'currency' => 'aud',
'description' => 'first payout payment transfer on stripe',
'destination' => $bank_id,
'method' => 'instant',
'source_type' => 'bank_account',
'statement_descriptor' => 'first payout payment transfer on stripe ',
],
["stripe_account" => "{{CONNECTED_STRIPE_ACCOUNT_ID}}"]); // value like "acct_xxx"
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.