#0xTypedef
1 messages ยท Page 1 of 1 (latest)
The available array represent the balance that's available for payout or transfer (https://stripe.com/docs/api/balance/balance_object?lang=php#balance_object-available) .
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
so total earnings would be pending + available?
I don't have details on how the total earning page presents the data. You can reach out to Stripe support https://support.stripe.com/contact and see if they can help you.
okay sounds good
๐ taking over for my colleague. Let me know if there's any follow-up Qs I can answer!
can you check the recent previous messages and see if you know the answer?
I have totalearnings like this currently
const totalEarnings = useMemo(() => {
if (accountBalance.data) {
const availableBalance = accountBalance.data.available.reduce(
(acc, cur) => acc + cur.amount,
0,
);
const pendingBalance = accountBalance.data.pending.reduce(
(acc, cur) => acc + cur.amount,
0,
);
const reserved = accountBalance.data.connect_reserved;
const reservedBalance = reserved
? reserved.reduce((acc, cur) => acc + cur.amount, 0)
: 0;
return (
availableBalance +
pendingBalance -
reservedBalance
).toLocaleString("en-US", {
style: "currency",
currency: "USD",
});
}
return "$0.00";
}, [accountBalance.data]);
this is more in the turf of https://support.stripe.com/?contact=true
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.
but let me check for you
what I'm not sure is why you're checking your totalearnings from the account balance where as I see this to be more straightforward to get from the PaymentIntents API