#connorleech_18781

1 messages · Page 1 of 1 (latest)

gloomy tapirBOT
mossy meadow
tight ether
#

Hmm so I'm not seeing the request in my account. We do have an platform account that manages "Connect" accounts if that makes a difference. This is a Connect account we have to update the structure of

mossy meadow
#

You probably need to go to the connected account, click on the ••• button in the top right, view the Dashboard as that account, then get to the request after that.

tight ether
#

sorry, where are the ...?

#

ah nevermind i got it: req_TkGFcEKCynKdRh

mossy meadow
#

Go to Connect > click on the account in question > then the ••• button.

tight ether
#

that's the request id ^

mossy meadow
#

Looking...

#

Oh, you're using a very old API version (2017-01-27). That's likely the issue. If you set the API version to our latest API version (2023-08-16) does it work? https://stripe.com/docs/api/versioning

tight ether
#

Okay lemme check. When I did Stripe::getApiVersion() it returned null which I took to mean we were using the latest version

mossy meadow
#

No, that means you're not setting an explicit API version in your code, which means you'll fall back to the default API version on your account.

#

It's recommended that you specify a specific API version in your code so changing the default in your Dashboard doesn't break your code.

tight ether
#

hmm no getting same error with this code:

$accountId = shop_setting('stripe.custom.stripe_user_id');

$stripe = new \Stripe\StripeClient(config('services.stripe.secret'));
\Stripe\Stripe::setApiKey(config('services.stripe.secret'));

\Stripe\Stripe::setApiVersion('2023-08-16');
\Stripe\Stripe::getApiVersion(); // "2023-08-16"


$stripe->accounts->update($accountId, [
  'company' => [
      'structure' => 'single_member_llc'
    ]
]);
#

ah it was something with the static methods versus using StripeClient

#

This worked:
Account::update($accountId, ['company' => [
'structure' => 'single_member_llc'
]]);

mossy meadow
#

Ah, yeah, those two approaches aren't compatible.

#

You should use one or the other.