#TBM
1 messages · Page 1 of 1 (latest)
sorry my bad. I forgot to put it inside a try catch loop for troubleshooting. I only relied on research from the links.
Ill troubleshoot this properly first then come back.
Ok sounds good! Appreciate it
im trying to get the balance of a connect account. and i used the code from this link. https://stripe.com/docs/connect/account-balances?locale=en-GB .
However after putting it inside a try catch statement i get this error (Status 400) (Request req_IRg6EiGfnRKXjl) Received unknown parameter: stripe_account
evidence suggests the stripe_account copied from this link https://stripe.com/docs/connect/account-balances?locale=en-GB doesn't exist?
Hm interesting. Can you share the request id? https://support.stripe.com/questions/finding-the-id-for-an-api-request
Find help and support for Stripe. Our support center 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 think i should also add that i changed the code a bit to ```php
$balance = $stripe->balance->retrieve([
'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}'
]);
req_IRg6EiGfnRKXjl
Oh I think if you don't use the static method way of doing things, you have to pass a null value in as the function's first arg. So like:
[
'stripe_account' => '{{CONNECTED_STRIPE_ACCOUNT_ID}}'
]);```
Thank you very much, that appears to work.
Cool
is there a link about this for further research?
We recommend people use the static methods, so that's why all our PHP docs use them now. The library still allows you to do things by instantiating the client and calling the methods that way because that's how the PHP library initially only worked several years back. Let me see if I can find something though
Recommend you follow the static method way of doing things though, as our docs will be easier to follow
Well I have to apologize here actually... I'm not an expert on our PHP library as I haven't had as much exposure on that one. So does look like most of our docs use the client way of doing things (by instantiating a Stripe client like you have here) and the static method is the older way of doing things. I just flip flopped it in my head, so I do apologize. Looks like that code snippet in particular just hasn't been updated to the newer way.
I'll go ahead and file feedback on this with the docs folks so it's not as confusing
Tracked down this Github issue: https://github.com/stripe/stripe-php/issues/124#issuecomment-628922061