#diana_code
1 messages ยท Page 1 of 1 (latest)
๐ 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.
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.
- diana_code, 5 days ago, 59 messages
- diana_code, 6 days ago, 21 messages
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',
],
]
);
So you want to move funds between Stripe Connected accounts?
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
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.
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?
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
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)?
There are 3 ways to transfer money from a Connected account back to the Platform:
- Reversing transfers - send back funds received via a transfer, limited to the original amount: https://stripe.com/docs/connect/charges-transfers#reversing-transfers
- Account debit - debit Express or Custom account for an arbitrary amount (some limitations apply): https://stripe.com/docs/connect/account-debits
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?
It pays out funds from your Stripe account balance to your external bank account.
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.
Are you trying to create payouts via the API or the dashboard?
API
You can just use the Payouts API as shown in our docs
https://docs.stripe.com/api/payouts/create
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?
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?
I'm attempting to make a payout to connected accounts' bank accounts.
Are there any guides/docs you're following for this?
What error are you running into when you use the code you shared?
Also, fwiw you can refer to this end to end guide which shows how you can collect payments and then pay out
https://docs.stripe.com/connect/collect-then-transfer-guide
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"
}
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
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();
}
I'd recommend referring to the docs I shared above as they explain how you can handle this.
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!