#TBM

1 messages · Page 1 of 1 (latest)

unkempt elbowBOT
pale kelp
#

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.

winter junco
#

Ok sounds good! Appreciate it

pale kelp
winter junco
pale kelp
#

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}}'
]);

winter junco
#

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}}'
  ]);```
pale kelp
winter junco
#

Cool

pale kelp
winter junco
#

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