#planetcreate_code

1 messages · Page 1 of 1 (latest)

minor terraceBOT
#

👋 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/1245280845300891659

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

tidal swan
#

What's the account ID?

versed barn
#

This is the account id acct_1PL7FpR1NY5FsoME

tidal swan
#

OK, can you share with me the API response that you get from retrieving the account's balance?

versed barn
#

Sorry what do you mean just the result of the console.log or something else?

tidal swan
#

console.log(balance)

versed barn
#

oke that is
object: 'balance',
available: [ { amount: 0, currency: 'eur', source_types: [Object] } ],
livemode: true,
pending: [ { amount: 0, currency: 'eur', source_types: [Object] } ]
} {

tidal swan
#

Ok, so you question is why the Dashboard shows euro 1 for on the way to bank account, but the pending amount in the API resposne shows 0 ?

versed barn
#

yes that is my quastion.

#

Because i need the total balance to show to the user, in the profile page of my website.

tidal swan
#

OK, they are two different things, the euro 1 that you saw in Dashbaord represent the most recent payout, it's not the same as pending balance.

versed barn
#

Oké, so how do i retrieve the total balance?

tidal swan
#

What do you mean by "total blance" ? available balance + pending balance?

versed barn
#

this is what i mean with the total balance.

tidal swan
#

And what page is it?

#

Do you have the URL?

versed barn
#

The stripe connect page of the user with the id acct_1PL7FpR1NY5FsoME.

crimson goblet
#

hi! I'm taking over this thread.

#

I'm not sure how exactly the total balance is computed in the dashboard. but I would always rely on the API response.

versed barn
#

oké, so is there a other way to retrieve how mach money is on the way to the user because i need it to make clear to the user that there money is on the way to there. because the api response works until a transfer go's from status transfer to payout.

crimson goblet
#

how mach money is on the way
sure, you would listen to the payout.created event to know the amont that is being sent to the connected account.