• Resolved Jam

    (@dabert3)


    Hi

    I hope someone will answer this.

    Is it possible to retrieve balance from my Stripe Admin account? Basically I have a store connected that had vendors connected with their Stripe account and I want to know if there is any chance to retrieve data…
    I tried \Stripe\Balance::retrieve() from Stripe API and yes it displays my data including my balance but I can`t get inside the object array because of its protected https://prntscr.com/slm79g…

    Any thoughts?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Hi.

    According to docs https://stripe.com/docs/api/balance/balance_object, you can retrieve your balance like this:

    $balance = \Stripe\Balance::retrieve();
    echo $balance->available[0]['amount'];

    Keep in mind though that $balance->available array can have more than one item (depending on the currencies you’re using for your account). In this case you would have to iterate through the array to get specific currency balance.

    Thread Starter Jam

    (@dabert3)

    Thank you so much. I really appreciate it. Now I can get the balance. I was focus at

    echo "<pre>";
    print_r($balance);
    echo "</pre>"

    that’s why I couldn`t get through inside the object and if it does example image I provided $balance->_values[‘object’], it just return blank.
    Again thanks, you solve my problem ??????

    • This reply was modified 4 years, 6 months ago by Jam.
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Stripe Admin Balance’ is closed to new replies.