#hieutrung203
1 messages · Page 1 of 1 (latest)
Hello! We'll be with you shortly. 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.
- hieutrung203, 2 days ago, 14 messages
Can you share the use case what you're trying to do here?
For testing i use this code:
public function createExternalAccountCard(Request $request) { $stripe = new \Stripe\StripeClient($this->secretKey_test_lastest); $stripe = $stripe->accounts->createExternalAccount( 'acct_1OdkTAPIvKEgeaYF', ['external_account' => 'tok_visa_debit'] ); return response()->json($stripe); }
and a test bank account has been created, but in live product, how can i create a bank account for connect account? Do you have any document for this problem?
Hi river
Thanks for waiting! Discord is busy now and will take time to respond
Are you collecting bank account details yourself? If so, you can submit the bank account details in the external_account hash including the account_number, country, currency and relevant information: https://stripe.com/docs/api/external_account_bank_accounts/create#account_create_bank_account-external_account
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Actually, i already try your solution, here is the code:
`public function createExternalAccountCard(Request $request)
{
$stripe = new \Stripe\StripeClient($this->secretKey_test_lastest);
$stripe = $stripe->accounts->createExternalAccount(
'acct_1OdkTAPIvKEgeaYF',
['external_account'=> [
'number' => '4242424242424242',
'object' => 'card',
'exp_month' => '10',
'exp_year' => '30',
]]
);
return response()->json($stripe);
}`
but it's return error: Requests made on behalf of a connected account must use card tokens from Stripe.js, but card details were directly provided.
This is a card, but not bank account. Are you using card or bank account for external account?
Card, please
The steps will be:
- Collect the card information by creating a token with
currencyset using Stripe.js: https://stripe.com/docs/js/tokens/create_token - Attach the external account (the card) to the Custom Account https://stripe.com/docs/api/external_account_cards/create
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
What about a bank account?