问题
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.
回答1:
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
来源:https://stackoverflow.com/questions/35411609/get-a-list-of-the-charges-on-a-stripe-account-connected-via-stripe-connect