#Mahesh K
1 messages ยท Page 1 of 1 (latest)
๐ happy to help
hi @thin scroll
how may I help?
i want fetch the total amount in my stripe
and total amount deposited through payout to my bank account
via API?
you can retrieve your account's Balance
https://stripe.com/docs/api/balance/balance_retrieve
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
and Payouts https://stripe.com/docs/api/payouts/list
what if my payouts crossed 100
const payouts = await stripe.payouts.list({
limit: 3,
});
A limit on the number of objects to be returned. Limit can range between 1 and 100, and the default is 10.
I like to calculate total payout amount.
You ned to paginate your request, and fetch the new window/page
https://stripe.com/docs/api/pagination
ok @tardy flint
const payouts = await stripe.payouts.list({
limit: 3,
stripeAccount: accountID,
});
will it works?
Refer to this guide on how to work with header authentication: https://stripe.com/docs/connect/authentication#stripe-account-header
The call should rather be something like this:
const payouts = await stripe.payouts.list({
limit: 3,
}, {stripeAccount: accountID});
const payouts = await stripe.payouts.list(
{
limit: 3
},
{
stripeAccount: accountID
}
);
ok, that's what i tried