简体   繁体   中英

How to make External Bank account as default account in Stripe Connect?

I am adding external bank account in stripe account through its library, and i want to make account as default account from my side in Stripe. So can any one help me whether it is possible or not. I have already referred Stripe connect APi. But i can not find any solution for that.

Below is the link which i am using.

https://stripe.com/docs/api#account_update_bank_account

I need do this from API my solution.

$account = \Stripe\Account::retrieve("acct_1D3pnBDRbcBW58lj");
$bank_account = $account->external_accounts->retrieve("ba_1DTppmDRbcBW58ljE9hni34m");
$bank_account->metadata["default_for_currency"] = true;
$bank_account->save();

I tried the solution as described by @Yuri but it did not work for me.

This is the solution which did work:

    Account::updateExternalAccount($merchant_id, $bankAccId, [
        'default_for_currency' => true
    ]);

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM