我可以获取与 Stripe 支付关联的转账吗?
Can I fetch Transfers associated with a Stripe Payout?
当我收到来自 Stripe 的支付创建或支付的 webhook,并且我有支付 ID 时,有没有办法获取为该支付创建的所有转账?
我可以这样取钱
var service = new PayoutService();
var payout = await service.GetAsync("po_1KJOuO***********h8S");
付款似乎有一个“BalanceTransaction”属性,但我不确定它是否会包含“Transfers”,因为我在 Stripe docs
对于与特定付款相关的转账,您可以 specify the type
attribute in your request to the Balance Transactions API /v1/balance_transactions
. You can also expand the source
attribute on the Balance Transaction 对象以在单个请求中也获取相关的付款对象。
下面是如何使用官方 Stripe 库
在 Python 中发出此请求的示例
transfers = stripe.BalanceTransaction.list(
payout=payout.id,
type="transfer",
expand=["source"],
)
当我收到来自 Stripe 的支付创建或支付的 webhook,并且我有支付 ID 时,有没有办法获取为该支付创建的所有转账?
我可以这样取钱
var service = new PayoutService();
var payout = await service.GetAsync("po_1KJOuO***********h8S");
付款似乎有一个“BalanceTransaction”属性,但我不确定它是否会包含“Transfers”,因为我在 Stripe docs
对于与特定付款相关的转账,您可以 specify the type
attribute in your request to the Balance Transactions API /v1/balance_transactions
. You can also expand the source
attribute on the Balance Transaction 对象以在单个请求中也获取相关的付款对象。
下面是如何使用官方 Stripe 库
在 Python 中发出此请求的示例transfers = stripe.BalanceTransaction.list(
payout=payout.id,
type="transfer",
expand=["source"],
)