How do you get a list of customer charges on a connected Stripe account?
For the main account, I use this:
Stripe::Charge.all(customer: stripe_id).data
But I can't find any documentation on getting charges off of another account without changing the Stripe.api_key
for that call alone, which seems like a terrible practice.
The answer is to add the
stripe_account
key to the options hash of the Stripe API call: