簡體   English   中英

獲取通過Stripe Connect連接的Stripe帳戶的費用清單

[英]Get a list of the charges on a Stripe account connected via Stripe Connect

如何獲得已連接的Stripe帳戶上的客戶費用清單?

對於主帳戶,我使用以下命令:

  Stripe::Charge.all(customer: stripe_id).data

但是我沒有找到任何關於如何從另一個帳戶中扣除費用的文檔,而不必單獨更改該調用的Stripe.api_key ,這似乎是一種糟糕的做法。

答案是將stripe_account密鑰添加到Stripe API調用的options哈希中:

  Stripe::Charge.all(
    { customer: stripe_id },
    stripe_account: connected_account_id
  ).data

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM