#connorleech_18781
1 messages · Page 1 of 1 (latest)
Hello! Hm, that looks correct... can you give me the request ID showing that error? Here's how you can find a request ID: https://support.stripe.com/questions/finding-the-id-for-an-api-request
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
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.
Go to Connect > click on the account in question > then the ••• button.
that's the request id ^
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
Okay lemme check. When I did Stripe::getApiVersion() it returned null which I took to mean we were using the latest version
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.
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'
]]);