how to add external bank account with customer in stripe using laravel
how to add external bank account with customer in stripe using laravel
{
"id": "ba_1MI3bbF23J5kz1XAe7HfLvuN",
"object": "bank_account",
"account": "acct_1MHoBlF23J5kz1XA",
"account_holder_name": "Jane Austen",
"account_holder_type": "individual",
"account_type": null,
"available_payout_methods": [
"standard"
],
"bank_name": "STRIPE TEST BANK",
"country": "US",
"currency": "usd",
"fingerprint": "1JWtPxqbdX5Gamtz",
"last4": "6789",
"metadata": {},
"routing_number": "110000000",
"status": "new"
}
I generate this response using this code
$account = \Stripe\Account::create(array(
"type" => "custom",
"country" => "US",
"email" => auth()->user()->email,
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
));
$account_id = $account->id;
$external_account = $stripe->accounts->createExternalAccount(
$account_id,
$user->stripe_customer_id,
[
'external_account' => $token->id,
]
);
how to generate this response { "id": "ba_1MI35QF23J5kz1XAwIvJPWa0", "object": "bank_account", "account_holder_name": "girish", "account_holder_type": "individual", "account_type": null, "bank_name": "STRIPE TEST BANK", "country": "US", "currency": "usd", "customer": "cus_N27I4C187MRZac", "fingerprint": "wrigOuKxXT4GeRSr", "last4": "6789", "metadata": {}, "routing_number": "110000000", "status": "verified" }
how to "customer": "cus_N27I4C187MRZac" store when i create external account.
An external account is basically a bank account for your connected account to create payout to. You can follow the API reference and pass all the necessary information (ie, account_number
and currency
) to create an external account.
If you have a frontend integration, you can also create a token in the frontend, and pass the token ID to backend and call the external account creation API to create a external account.
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.