我可以获取与条带支付关联的转账吗? [英] Can I fetch Transfers associated with a Stripe Payout?

查看:18
本文介绍了我可以获取与条带支付关联的转账吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我从Stiped收到创建或支付的支出时,并且我有支出ID,是否有方法获取为该支出创建的所有转账?

我可以这样提取支出

var service = new PayoutService();
var payout = await service.GetAsync("po_1KJOuO***********h8S");

看起来支出具有";BalanceTransaction&Quot;属性,但我不确定它是否会包含";Transfer&Quot;,因为我在Stripe docs

中没有看到它

推荐答案

对于与特定支出相关的转账,您可以specify the type attribute in your request to the Balance Transactions API/v1/balance_transactions。您还可以通过expand the source attribute on the Balance Transaction对象在单个请求中获取相关支出对象。

下面是如何使用官方条带库在Python中发出此请求的示例

transfers = stripe.BalanceTransaction.list(
  payout=payout.id,
  type="transfer",
  expand=["source"],
)

这篇关于我可以获取与条带支付关联的转账吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆