Reputation: 4404
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.
Upvotes: 1
Views: 541
Reputation: 4404
The answer is to add the stripe_account
key to the options hash of the Stripe API call:
Stripe::Charge.all(
{ customer: stripe_id },
stripe_account: connected_account_id
).data
Upvotes: 2