#ilies_api
1 messages ยท Page 1 of 1 (latest)
๐ Welcome to your new thread!
โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
โฑ๏ธ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
๐ This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1364516899509108766
๐ Have more to share? Add more details, code, screenshots, videos, etc. below.
Can you share the ID (req_xxx) of the API request? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support site provides answers on all types of situations, including account information, charges and refunds, and subscriptions information. Get your questions answered and find international support for Stripe.
I would suspect that based on the error you haven't completed the 'questionnaire' in the Dashboard to enable Connect on whatever account's keys you're using
This kind of proves that theory, because there should be a log
So you're either on the wrong account, or using a Sandbox
That doesn't show me anything I'm afraid. I suspect you're looking at a different account/Sandbox as stated
Hence why you can't find the request log
If you make the API request again, check the response headers. There should be a req_xxx ID in there
My request gets a "500 Internal Server Error".
And to be honest i'm not even sure that this is the right request.
That's your server that is returning a 500 error โ not us
You need to correct catch and handle the exception thrown by the PHP SDK code: https://docs.stripe.com/sdks/server-side?lang=php#errors
Sorry that doesn't help me much, i still get the same error message
You need to do this, essentially: https://github.com/stripe/stripe-php?tab=readme-ov-file#accessing-response-data
That should print out a req_xxx in your server logs
There is no issue with the request you're giving me : req_EfQLGjCeoSzJ55
It's the one i'm trying to do that get the error
What's your account ID? acct_xxx?
acct_1EahBMCduUEOhAfj
OK so that error message ('You can only create new accounts if you've signed up for Connect,
which you can learn how to do at https://stripe.com/docs/connect'') is thrown by an internal code. I'm looking at all request logs for the past 7 days that have thrown that error code and none of the requests were made by keys from acct_1EahBMCduUEOhAfj
So that implies my original theory is probably accurate โ you're looking at the Dashboard for a different account, not acct_1EahBMCduUEOhAfj or using different API keys
hi! I'm taking over this thread. let me know if you have other questions.
But we only have one account don't we ?
Hi
The account is the right one since when i did the request to create a customer it worked
its when i'm trying to create a Connect account that the error pops up
Can you log the full error message you get when the API fails? I'm looking for the Request ID it in (req_xxx)
Here is the request when creating a customers
Here is the result when creating an account
How are you trying to create the account? With the API? If so, can you share the full response from Stripe?
I'm using the PHP SDK
public function createExpressAccount(Company $company): ?Account
{
$account = $this->stripe->accounts->create([
'type' => 'express',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
'business_type' => 'company',
]);
dd($account);
$company->setStripeAccountId($account->id);
return $account;
}
then can you share the full error message returned by Stripe?
I only have the error 500
can you wrap your code in a try ... catch and log the error?
try {
$account = $this->stripe->accounts->create([
'type' => 'express',
'capabilities' => [
'card_payments' => ['requested' => true],
'transfers' => ['requested' => true],
],
'business_type' => 'company',
]);
} catch (ApiErrorException $e) {
throw new RuntimeException('Error creating Stripe account: ' . $e->getMessage());
}
Unless there is a specific Stripe error handler i'm still getting the same message
now you need to log that errror message somewhere.
hum... wait.
and if you try to log what's inside $e directly?
Error creating Stripe account: Error sending request to Stripe: (Status 400) (Request req_HyHdMYf4xdJLl2) You can only create new accounts if you've signed up for Connect, which you can learn how to do at https://stripe.com/docs/connect.
My apologies here is the request id
Perfect! looking at the request ID.
Pardon my capabilities i'm still a trainee