#diana_code

1 messages ยท Page 1 of 1 (latest)

wary prawnBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1217443323254542386

๐Ÿ“ Have more to share? Add more details, code, screenshots, videos, etc. below.

supple fieldBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

rough drum
#

Hi, let me help you with this.

#

How did you integrate external bank accounts exactly?

twilit inlet
#

let show you my code

#

$employeeAccount = \Stripe\Account::create([
'type' => 'custom',
'country' => 'US',
'email' => '$employeeEmail',
'business_type' => 'individual',
'individual' => [
'first_name' => 'employeeName',
'last_name' => 'employeeLastName',
'dob' => [
'day' => "$employeeDOBday",
'month' => "$employeeDOBmonth",
'year' => "$employeeDOByear",
],
'address' => [
'line1' => '$employeeAddress',
'city' => '$employeeCity',
'state' => '$employeeState',
'postal_code' => '$employeeZIP',
],
'ssn_last_4' => '$employeeSNN',
'email' => '$employeeEmail',
'phone' => '$employeePhone',
],
'capabilities' => [
'transfers' => ['requested' => true],
'card_payments' => ['requested' => false],
'payto_payments' => ['requested' => false],
],
'business_profile' => [
"url"=> '$URL',
],
'tos_acceptance' => [
'date' => time(),
'ip' => $_SERVER['REMOTE_ADDR'],
],
'metadata' => [
'url' => '$URL',
],
]);
$bankAccount = \Stripe\Account::createExternalAccount(
$employeeAccount->id,
[
'external_account' => [
'object' => 'bank_account',
'country' => 'US',
'currency' => 'usd',
'account_holder_name' => '$employeeFullName',
'account_holder_type' => 'individual',
'routing_number' => '$employeerouting',
'account_number' => '$employeeaccoun',
],
]
);

rough drum
#

So you want to move funds between Stripe Connected accounts?

twilit inlet
#

Yes, that's correct. I've integrated Stripe Connected accounts into my application, and now I need to facilitate direct transfers of funds between these accounts. Could you please provide guidance on how to achieve this within the Stripe platform?

#

actually I linked my bank account to do that

rough drum
#

Normally you only want to move funds from the Platform account to Connected accounts.

#

And then create Payouts from Connected accounts to external bank accounts.

twilit inlet
#

Thanks for the clarification. Yes, ideally I want to transfer funds from the platform account to connected accounts and then create payments from those connected accounts to external bank accounts. However, in my case, I also need to be able to transfer funds directly between connected accounts. Is there a way to enable this functionality?

rough drum
#

Not really. You would need to send funds back to the Platform and then to the other connected account, but there's limitations. Perhaps you want to look at Treasury, but my team doesn't know much about how it works: https://stripe.com/treasury

twilit inlet
#

So can I transfer funds to my stripe account and then transfer them to my employees' bank accounts (which I previously registered as a connected account)?

rough drum
twilit inlet
#

Thank you for providing this detailed information. I will look into the options you mentioned and review the corresponding documentation to better understand how I can handle transfers between connected accounts. I also read about the possibility of creating a payout object using Stripe\Payout::create. What can you tell me about Stripe\Payout::create?

supple fieldBOT
rough drum
#

It pays out funds from your Stripe account balance to your external bank account.

twilit inlet
#

Thank you for providing that information. I believe the feature to transfer funds from my Stripe account balance to external bank accounts could be very beneficial for our needs. Could you please guide me on how to set up and use this feature in my Stripe account? Your assistance is greatly appreciated.

lucid parcel
#

Are you trying to create payouts via the API or the dashboard?

twilit inlet
#

API

lucid parcel
twilit inlet
#

I've been attempting to use the following code:

php
Copy code
$transferencia = \Stripe\Payout::create([
'amount' => $monto,
'currency' => $moneda,
'destination' => $cuentaBancariaExternaDestinoId,
'source_type' => 'bank_account',
]);
However, I'm encountering some issues. Could you please review this code and provide guidance on how to properly implement payouts to external bank accounts via the API?

lucid parcel
#

That code is different than what's in our docs.
Are you trying to make a payout to your own external bank account OR a connected account's bank account?

twilit inlet
#

I'm attempting to make a payout to connected accounts' bank accounts.

lucid parcel
#

Are there any guides/docs you're following for this?

twilit inlet
lucid parcel
twilit inlet
#

resource_missing - destination
No such external account: 'ba_XXXXXXXXXXXXX'

Was this useful?

Yes

No
{
"destination": "ba_XXXXXXXXXXX",
"source_type": "bank_account",
"amount": "50",
"currency": "usd"
}

lucid parcel
#

The short version of this is that you don't create a payout directly to connected account bank account.

As a platform, you make a transfer to the connected account which adds funds to connected account balance & then based on the payout mode (automatic/manual) the funds can be paid out to the bank account.

If the connected account is on automatic payouts then it will follow the payout schedule you set.
If the connected account is on manual payouts then you'd make an API request to trigger payout as per: https://docs.stripe.com/connect/add-and-pay-out-guide?dashboard-or-api=api#with-code-pay-out-to-user

twilit inlet
#

i run this one for obtain the external account

try {
$bankAccounts = \Stripe\Account::retrieve($accountId)->bank_accounts;
foreach ($bankAccounts as $bankAccount) {
echo "<br>ID de la cuenta bancaria: " . $bankAccount->id;
}
} catch (\Stripe\Exception\CardException $e) {
// Manejar el error
echo "<brAError al obtener las cuentas bancarias: " . $e->getMessage();
}

lucid parcel
#

I'd recommend referring to the docs I shared above as they explain how you can handle this.

twilit inlet
#

Got it! I'll review the documentation thoroughly. Thank you so much for all your help and guidance on this matter. If I have any further questions, I won't hesitate to reach out again. Have a great day!