On my web app, I have Stripe customers making payments through cards to Stripe connected accounts. I am trying to retrieve the payment histories the customer made to display it back to the customer to build a transaction histories dashboard. So far, I tried:
const balanceTransactions = await stripe.customers.listBalanceTransactions(
'cus_xxxxyyy',
{limit: 3}
);
console.log(balanceTransactions);
But the balance transactions are empty, the customer do have payment histories if I look into my Stripe console (although it is in test mode):
{
object: 'list',
data: [],
has_more: false,
url: '/v1/customers/cus_xxxxyyy/balance_transactions'
}
Does payment not count as a balance transaction? Any other way that I can retrieve all the payment histories a customer made in the past, preferably a hosted tool by Stripe?