#mahraamir
1 messages · Page 1 of 1 (latest)
Can you share the ID (req_xxx) of the failing 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 am not sure if there any request generating to stripe but let me check
Then how are you sure there's a 5xx returned?
it seems to me that there is something missing in the sdk for financeial connection
I need more details on the API request you're actually trying to make
public function get_fc_balance($request)
{
try {
$this->util->log_exception(json_encode($request),'get_fca_balance');
$stripe = new \Stripe\StripeClient($this->dc_sec_key);
$response = $stripe->financialConnections->sessions->create([
'account_holder' => [
'type' => 'customer',
'customer' => $request['stp_customerid'],
],
'permissions' => ['balances'],
'prefetch' => ['balances'],
]);
$this->util->log_exception($response,'get_fca_balance_resp');
return $response;
} catch (Exception $exception){
$this->util->log_exception($exception->getMessage(),'get_fca_balance_err');
return false;
}
}
first statement is for logging the data
it is logging the request
Ok, so there should be a req_xxx ID. Can you share that please
Then:
- You're looking at the logs of the wrong account.
- The
500error is thrown else where in your code.
You need to catch the exception/error and share it here
I have doubt the sdk I have may be not have methods for financial connection?
Depends what version you're using
via Composer I guess
Think we added support in 7.127.0: https://github.com/stripe/stripe-php/blob/master/CHANGELOG.md#71270---2022-05-05
{
"name": "stripe/stripe-php",
"description": "Stripe PHP Library",
"keywords": [
"stripe",
"payment processing",
"api"
],
"homepage": "https://stripe.com/",
"license": "MIT",
"authors": [
{
"name": "Stripe and contributors",
"homepage": "https://github.com/stripe/stripe-php/contributors"
}
],
"require": {
"php": ">=5.6.0",
"ext-curl": "",
"ext-json": "",
"ext-mbstring": "*"
},
"require-dev": {
"phpunit/phpunit": "^5.7",
"php-coveralls/php-coveralls": "^2.1",
"squizlabs/php_codesniffer": "^3.3",
"symfony/process": "~3.4",
"friendsofphp/php-cs-fixer": "2.17.1"
},
"autoload": {
"psr-4": {
"Stripe\": "lib/"
}
},
"autoload-dev": {
"psr-4": {
"Stripe\": [
"tests/",
"tests/Stripe/"
]
}
},
"extra": {
"branch-alias": {
"dev-master": "2.0-dev"
}
}
}
cat VERSION
7.69.0
That tells me nothing. Try:
composer show "stripe/stripe-php" --all
Then yes you need to update
will that affect old integration?
Shouldn't do as you're not doing a major upgrade so shouldn't any breaking changes
ok let me try
$response = $stripe->financialConnections->sessions->create([
'account_holder' => [
'type' => 'customer',
'customer' => $request['stp_customerid'],
],
'permissions' => ['balances'],
'prefetch' => ['balances'],
]);
this code is generating exception
Yes, I updated but getting same 500 error when access this method, I am using ARC to test the API
I don't know what that is
But you need to share the actual error in the exception
Is there an API request in your logs now?
If not then Stripe isn't returning a 500 error and there's an error being thrown elsewhere in your code